<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680883594"><span id="local-6989586621680883595"></span></span><span>
</span><span id="line-2"></span><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

\section[PatSyntax]{Abstract Haskell syntax---patterns}
-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE DeriveFoldable #-}</span><span>
</span><span id="line-12"></span><span class="hs-pragma">{-# LANGUAGE DeriveTraversable #-}</span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-14"></span><span class="hs-pragma">{-# LANGUAGE StandaloneDeriving #-}</span><span>
</span><span id="line-15"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-16"></span><span class="hs-pragma">{-# LANGUAGE UndecidableInstances #-}</span><span> </span><span class="hs-comment">-- Wrinkle in Note [Trees That Grow]</span><span>
</span><span id="line-17"></span><span>                                      </span><span class="hs-comment">-- in module GHC.Hs.Extension</span><span>
</span><span id="line-18"></span><span class="hs-pragma">{-# LANGUAGE ConstraintKinds #-}</span><span>
</span><span id="line-19"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-20"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns      #-}</span><span>
</span><span id="line-21"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-22"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-23"></span><span class="hs-pragma">{-# LANGUAGE TypeApplications #-}</span><span>
</span><span id="line-24"></span><span class="hs-pragma">{-# LANGUAGE LambdaCase #-}</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Hs.Pat</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier">Pat</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier">LPat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier">ConPatTc</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier">CoPat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#ListPatTc"><span class="hs-identifier">ListPatTc</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier">ConLikeP</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier">HsConPatDetails</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier">hsConPatArgs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier">HsRecFields</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier">HsRecField'</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField%27"><span class="hs-identifier">LHsRecField'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier">HsRecField</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier">LHsRecField</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecUpdField"><span class="hs-identifier">HsRecUpdField</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier">LHsRecUpdField</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFields"><span class="hs-identifier">hsRecFields</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier">hsRecFieldSel</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldId"><span class="hs-identifier">hsRecFieldId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldsArgs"><span class="hs-identifier">hsRecFieldsArgs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldId"><span class="hs-identifier">hsRecUpdFieldId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldOcc"><span class="hs-identifier">hsRecUpdFieldOcc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldRdr"><span class="hs-identifier">hsRecUpdFieldRdr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#mkPrefixConPat"><span class="hs-identifier">mkPrefixConPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#mkCharLitPat"><span class="hs-identifier">mkCharLitPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#mkNilPat"><span class="hs-identifier">mkNilPat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier">isSimplePat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier">looksLazyPatBind</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#isBangedLPat"><span class="hs-identifier">isBangedLPat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#patNeedsParens"><span class="hs-identifier">patNeedsParens</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#parenthesizePat"><span class="hs-identifier">parenthesizePat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#isIrrefutableHsPat"><span class="hs-identifier">isIrrefutableHsPat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier">collectEvVarsPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#collectEvVarsPats"><span class="hs-identifier">collectEvVarsPats</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier">pprParendLPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier">pprConArgs</span></a></span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html"><span class="hs-identifier">GHC.Hs.Expr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier">SyntaxExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier">LHsExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsSplice"><span class="hs-identifier">HsSplice</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#pprLExpr"><span class="hs-identifier">pprLExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#pprSplice"><span class="hs-identifier">pprSplice</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">-- friends:</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html"><span class="hs-identifier">GHC.Hs.Binds</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html"><span class="hs-identifier">GHC.Hs.Lit</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html"><span class="hs-identifier">GHC.Hs.Extension</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html"><span class="hs-identifier">GHC.Hs.Type</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html"><span class="hs-identifier">GHC.Tc.Types.Evidence</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-64"></span><span class="hs-comment">-- others:</span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Ppr.html"><span class="hs-identifier">GHC.Core.Ppr</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-comment">{- instance OutputableBndr TyVar -}</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier">RdrName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html"><span class="hs-identifier">GHC.Core.ConLike</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span> </span><span class="hs-comment">-- collect ev vars from pats</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier">Name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- libraries:</span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier">TyCon</span></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/Data.Data.html#Fixity"><span class="hs-identifier">Fixity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">type</span><span> </span><span id="LPat"><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-var">LPat</span></a></span></span><span> </span><span id="local-6989586621680883566"><span class="annot"><a href="#local-6989586621680883566"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#XRec"><span class="hs-identifier hs-type">XRec</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883566"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | Pattern</span><span>
</span><span id="line-86"></span><span class="hs-comment">--</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnBang'</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-90"></span><span class="hs-keyword">data</span><span> </span><span id="Pat"><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-var">Pat</span></a></span></span><span> </span><span id="local-6989586621680883993"><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span></span><span>
</span><span id="line-91"></span><span>  </span><span class="hs-glyph">=</span><span>     </span><span class="hs-comment">------------ Simple patterns ---------------</span><span>
</span><span id="line-92"></span><span>    </span><span id="WildPat"><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-var">WildPat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XWildPat"><span class="hs-identifier hs-type">XWildPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- ^ Wildcard Pattern</span><span>
</span><span id="line-93"></span><span>        </span><span class="hs-comment">-- The sole reason for a type on a WildPat is to</span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-comment">-- support hsPatType :: Pat Id -&gt; Type</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>       </span><span class="hs-comment">-- AZ:TODO above comment needs to be updated</span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="VarPat"><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-var">VarPat</span></a></span></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XVarPat"><span class="hs-identifier hs-type">XVarPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- ^ Variable Pattern</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>                             </span><span class="hs-comment">-- See Note [Located RdrNames] in GHC.Hs.Expr</span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LazyPat"><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-var">LazyPat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XLazyPat"><span class="hs-identifier hs-type">XLazyPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>                </span><span class="hs-comment">-- ^ Lazy Pattern</span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-comment">-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnTilde'</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="AsPat"><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-var">AsPat</span></a></span></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XAsPat"><span class="hs-identifier hs-type">XAsPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-comment">-- ^ As pattern</span><span>
</span><span id="line-109"></span><span>    </span><span class="hs-comment">-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnAt'</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ParPat"><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-var">ParPat</span></a></span></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XParPat"><span class="hs-identifier hs-type">XParPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>                </span><span class="hs-comment">-- ^ Parenthesised pattern</span><span>
</span><span id="line-115"></span><span>                                        </span><span class="hs-comment">-- See Note [Parens in HsSyn] in GHC.Hs.Expr</span><span>
</span><span id="line-116"></span><span>    </span><span class="hs-comment">-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'('@,</span><span>
</span><span id="line-117"></span><span>    </span><span class="hs-comment">--                                    'GHC.Parser.Annotation.AnnClose' @')'@</span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BangPat"><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-var">BangPat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XBangPat"><span class="hs-identifier hs-type">XBangPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>                </span><span class="hs-comment">-- ^ Bang pattern</span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-comment">-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnBang'</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>        </span><span class="hs-comment">------------ Lists, tuples, arrays ---------------</span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ListPat"><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-var">ListPat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XListPat"><span class="hs-identifier hs-type">XListPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span>                </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-129"></span><span>                   </span><span class="hs-comment">-- For OverloadedLists a Just (ty,fn) gives</span><span>
</span><span id="line-130"></span><span>                   </span><span class="hs-comment">-- overall type of the pattern, and the toList</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- function to convert the scrutinee to a list value</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>    </span><span class="hs-comment">-- ^ Syntactic List</span><span>
</span><span id="line-134"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'['@,</span><span>
</span><span id="line-136"></span><span>    </span><span class="hs-comment">--                                    'GHC.Parser.Annotation.AnnClose' @']'@</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="TuplePat"><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-var">TuplePat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XTuplePat"><span class="hs-identifier hs-type">XTuplePat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>                  </span><span class="hs-comment">-- after typechecking, holds the types of the tuple components</span><span>
</span><span id="line-142"></span><span>                </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">]</span><span>         </span><span class="hs-comment">-- Tuple sub-patterns</span><span>
</span><span id="line-143"></span><span>                </span><span class="annot"><a href="GHC.Types.Basic.html#Boxity"><span class="hs-identifier hs-type">Boxity</span></a></span><span>           </span><span class="hs-comment">-- UnitPat is TuplePat []</span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-comment">-- You might think that the post typechecking Type was redundant,</span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-comment">-- because we can get the pattern type by getting the types of the</span><span>
</span><span id="line-146"></span><span>        </span><span class="hs-comment">-- sub-patterns.</span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-comment">-- But it's essential</span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-comment">--      data T a where</span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-comment">--        T1 :: Int -&gt; T Int</span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-comment">--      f :: (T a, a) -&gt; Int</span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-comment">--      f (T1 x, z) = z</span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-comment">-- When desugaring, we must generate</span><span>
</span><span id="line-153"></span><span>        </span><span class="hs-comment">--      f = /\a. \v::a.  case v of (t::T a, w::a) -&gt;</span><span>
</span><span id="line-154"></span><span>        </span><span class="hs-comment">--                       case t of (T1 (x::Int)) -&gt;</span><span>
</span><span id="line-155"></span><span>        </span><span class="hs-comment">-- Note the (w::a), NOT (w::Int), because we have not yet</span><span>
</span><span id="line-156"></span><span>        </span><span class="hs-comment">-- refined 'a' to Int.  So we must know that the second component</span><span>
</span><span id="line-157"></span><span>        </span><span class="hs-comment">-- of the tuple is of type 'a' not Int.  See selectMatchVar</span><span>
</span><span id="line-158"></span><span>        </span><span class="hs-comment">-- (June 14: I'm not sure this comment is right; the sub-patterns</span><span>
</span><span id="line-159"></span><span>        </span><span class="hs-comment">--           will be wrapped in CoPats, no?)</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-comment">-- ^ Tuple sub-patterns</span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' :</span><span>
</span><span id="line-163"></span><span>    </span><span class="hs-comment">--            'GHC.Parser.Annotation.AnnOpen' @'('@ or @'(#'@,</span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-comment">--            'GHC.Parser.Annotation.AnnClose' @')'@ or  @'#)'@</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SumPat"><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-var">SumPat</span></a></span></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XSumPat"><span class="hs-identifier hs-type">XSumPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- after typechecker, types of the alternative</span><span>
</span><span id="line-167"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- Sum sub-pattern</span><span>
</span><span id="line-168"></span><span>                </span><span class="annot"><a href="GHC.Types.Basic.html#ConTag"><span class="hs-identifier hs-type">ConTag</span></a></span><span>             </span><span class="hs-comment">-- Alternative (one-based)</span><span>
</span><span id="line-169"></span><span>                </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>              </span><span class="hs-comment">-- Arity (INVARIANT: &#8805; 2)</span><span>
</span><span id="line-170"></span><span>    </span><span class="hs-comment">-- ^ Anonymous sum pattern</span><span>
</span><span id="line-171"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-172"></span><span>    </span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' :</span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-comment">--            'GHC.Parser.Annotation.AnnOpen' @'(#'@,</span><span>
</span><span id="line-174"></span><span>    </span><span class="hs-comment">--            'GHC.Parser.Annotation.AnnClose' @'#)'@</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span>    </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-comment">------------ Constructor patterns ---------------</span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ConPat"><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-var">ConPat</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-180"></span><span>        </span><span id="pat_con_ext"><span class="annot"><span class="annottext">forall p. Pat p -&gt; XConPat p
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var hs-var">pat_con_ext</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#XConPat"><span class="hs-identifier hs-type">XConPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-181"></span><span>        </span><span id="pat_con"><span class="annot"><span class="annottext">forall p. Pat p -&gt; Located (ConLikeP p)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var hs-var">pat_con</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier hs-type">ConLikeP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-182"></span><span>        </span><span id="pat_args"><span class="annot"><span class="annottext">forall p. Pat p -&gt; HsConPatDetails p
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var hs-var">pat_args</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-type">HsConPatDetails</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span>
</span><span id="line-183"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-comment">-- ^ Constructor Pattern</span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span>        </span><span class="hs-comment">------------ View patterns ---------------</span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-comment">-- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnRarrow'</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ViewPat"><span class="annot"><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-var">ViewPat</span></a></span></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XViewPat"><span class="hs-identifier hs-type">XViewPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- The overall type of the pattern</span><span>
</span><span id="line-191"></span><span>                                   </span><span class="hs-comment">-- (= the argument type of the view function)</span><span>
</span><span id="line-192"></span><span>                                   </span><span class="hs-comment">-- for hsPatType.</span><span>
</span><span id="line-193"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-comment">-- ^ View Pattern</span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span>        </span><span class="hs-comment">------------ Pattern splices ---------------</span><span>
</span><span id="line-198"></span><span>  </span><span class="hs-comment">-- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'$('@</span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-comment">--        'GHC.Parser.Annotation.AnnClose' @')'@</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SplicePat"><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-var">SplicePat</span></a></span></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XSplicePat"><span class="hs-identifier hs-type">XSplicePat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSplice"><span class="hs-identifier hs-type">HsSplice</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-comment">-- ^ Splice Pattern (Includes quasi-quotes)</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>        </span><span class="hs-comment">------------ Literal and n+k patterns ---------------</span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LitPat"><span class="annot"><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-var">LitPat</span></a></span></span><span>          </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XLitPat"><span class="hs-identifier hs-type">XLitPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsLit"><span class="hs-identifier hs-type">HsLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- ^ Literal Pattern</span><span>
</span><span id="line-208"></span><span>                                        </span><span class="hs-comment">-- Used for *non-overloaded* literal patterns:</span><span>
</span><span id="line-209"></span><span>                                        </span><span class="hs-comment">-- Int#, Char#, Int, Char, String, etc.</span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NPat"><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-var">NPat</span></a></span></span><span>                </span><span class="hs-comment">-- Natural Pattern</span><span>
</span><span id="line-212"></span><span>                        </span><span class="hs-comment">-- Used for all overloaded literals,</span><span>
</span><span id="line-213"></span><span>                        </span><span class="hs-comment">-- including overloaded strings with -XOverloadedStrings</span><span>
</span><span id="line-214"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XNPat"><span class="hs-identifier hs-type">XNPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>            </span><span class="hs-comment">-- Overall type of pattern. Might be</span><span>
</span><span id="line-215"></span><span>                                         </span><span class="hs-comment">-- different than the literal's type</span><span>
</span><span id="line-216"></span><span>                                         </span><span class="hs-comment">-- if (==) or negate changes the type</span><span>
</span><span id="line-217"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- ALWAYS positive</span><span>
</span><span id="line-218"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Just (Name of 'negate') for</span><span>
</span><span id="line-219"></span><span>                                           </span><span class="hs-comment">-- negative patterns, Nothing</span><span>
</span><span id="line-220"></span><span>                                           </span><span class="hs-comment">-- otherwise</span><span>
</span><span id="line-221"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- Equality checker, of type t-&gt;t-&gt;Bool</span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span>  </span><span class="hs-comment">-- ^ Natural Pattern</span><span>
</span><span id="line-224"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnVal' @'+'@</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span>  </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-228"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NPlusKPat"><span class="annot"><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-var">NPlusKPat</span></a></span></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XNPlusKPat"><span class="hs-identifier hs-type">XNPlusKPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-comment">-- Type of overall pattern</span><span>
</span><span id="line-229"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- n+k pattern</span><span>
</span><span id="line-230"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- It'll always be an HsIntegral</span><span>
</span><span id="line-231"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>            </span><span class="hs-comment">-- See Note [NPlusK patterns] in GHC.Tc.Gen.Pat</span><span>
</span><span id="line-232"></span><span>                     </span><span class="hs-comment">-- NB: This could be (PostTc ...), but that induced a</span><span>
</span><span id="line-233"></span><span>                     </span><span class="hs-comment">-- a new hs-boot file. Not worth it.</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- (&gt;=) function, of type t1-&gt;t2-&gt;Bool</span><span>
</span><span id="line-236"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Name of '-' (see GHC.Rename.Env.lookupSyntax)</span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-comment">-- ^ n+k pattern</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span>        </span><span class="hs-comment">------------ Pattern type signatures ---------------</span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-comment">-- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDcolon'</span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span>  </span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-243"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SigPat"><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-var">SigPat</span></a></span></span><span>          </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XSigPat"><span class="hs-identifier hs-type">XSigPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>             </span><span class="hs-comment">-- After typechecker: Type</span><span>
</span><span id="line-244"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>                </span><span class="hs-comment">-- Pattern with a type signature</span><span>
</span><span id="line-245"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#NoGhcTc"><span class="hs-identifier hs-type">NoGhcTc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">--  Signature can bind both</span><span>
</span><span id="line-246"></span><span>                                               </span><span class="hs-comment">--  kind and type vars</span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span>    </span><span class="hs-comment">-- ^ Pattern with a type signature</span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span>  </span><span class="hs-comment">-- | Trees that Grow extension point for new constructors</span><span>
</span><span id="line-251"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="XPat"><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-var">XPat</span></a></span></span><span>
</span><span id="line-252"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XXPat"><span class="hs-identifier hs-type">XXPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883993"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span class="hs-comment">-- ---------------------------------------------------------------------</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-keyword">data</span><span> </span><span id="ListPatTc"><span class="annot"><a href="GHC.Hs.Pat.html#ListPatTc"><span class="hs-identifier hs-var">ListPatTc</span></a></span></span><span>
</span><span id="line-258"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ListPatTc"><span class="annot"><a href="GHC.Hs.Pat.html#ListPatTc"><span class="hs-identifier hs-var">ListPatTc</span></a></span></span><span>
</span><span id="line-259"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>                             </span><span class="hs-comment">-- The type of the elements</span><span>
</span><span id="line-260"></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- For rebindable syntax</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XWildPat"><span class="annot"><a href="GHC.Hs.Extension.html#XWildPat"><span class="hs-identifier hs-var">XWildPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-263"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XWildPat"><span class="annot"><a href="GHC.Hs.Extension.html#XWildPat"><span class="hs-identifier hs-var">XWildPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-264"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XWildPat"><span class="annot"><a href="GHC.Hs.Extension.html#XWildPat"><span class="hs-identifier hs-var">XWildPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XVarPat"><span class="annot"><a href="GHC.Hs.Extension.html#XVarPat"><span class="hs-identifier hs-var">XVarPat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-267"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XLazyPat"><span class="annot"><a href="GHC.Hs.Extension.html#XLazyPat"><span class="hs-identifier hs-var">XLazyPat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-268"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XAsPat"><span class="annot"><a href="GHC.Hs.Extension.html#XAsPat"><span class="hs-identifier hs-var">XAsPat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-269"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XParPat"><span class="annot"><a href="GHC.Hs.Extension.html#XParPat"><span class="hs-identifier hs-var">XParPat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-270"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XBangPat"><span class="annot"><a href="GHC.Hs.Extension.html#XBangPat"><span class="hs-identifier hs-var">XBangPat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span class="hs-comment">-- Note: XListPat cannot be extended when using GHC 8.0.2 as the bootstrap</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- compiler, as it triggers https://gitlab.haskell.org/ghc/ghc/issues/14396 for</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- `SyntaxExpr`</span><span>
</span><span id="line-275"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XListPat"><span class="annot"><a href="GHC.Hs.Extension.html#XListPat"><span class="hs-identifier hs-var">XListPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-276"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XListPat"><span class="annot"><a href="GHC.Hs.Extension.html#XListPat"><span class="hs-identifier hs-var">XListPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XListPat"><span class="annot"><a href="GHC.Hs.Extension.html#XListPat"><span class="hs-identifier hs-var">XListPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#ListPatTc"><span class="hs-identifier hs-type">ListPatTc</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XTuplePat"><span class="annot"><a href="GHC.Hs.Extension.html#XTuplePat"><span class="hs-identifier hs-var">XTuplePat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-280"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XTuplePat"><span class="annot"><a href="GHC.Hs.Extension.html#XTuplePat"><span class="hs-identifier hs-var">XTuplePat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-281"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XTuplePat"><span class="annot"><a href="GHC.Hs.Extension.html#XTuplePat"><span class="hs-identifier hs-var">XTuplePat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XConPat"><span class="annot"><a href="GHC.Hs.Extension.html#XConPat"><span class="hs-identifier hs-var">XConPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-284"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XConPat"><span class="annot"><a href="GHC.Hs.Extension.html#XConPat"><span class="hs-identifier hs-var">XConPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-285"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XConPat"><span class="annot"><a href="GHC.Hs.Extension.html#XConPat"><span class="hs-identifier hs-var">XConPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-type">ConPatTc</span></a></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSumPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSumPat"><span class="hs-identifier hs-var">XSumPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-288"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSumPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSumPat"><span class="hs-identifier hs-var">XSumPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-289"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSumPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSumPat"><span class="hs-identifier hs-var">XSumPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XViewPat"><span class="annot"><a href="GHC.Hs.Extension.html#XViewPat"><span class="hs-identifier hs-var">XViewPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-292"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XViewPat"><span class="annot"><a href="GHC.Hs.Extension.html#XViewPat"><span class="hs-identifier hs-var">XViewPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-293"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XViewPat"><span class="annot"><a href="GHC.Hs.Extension.html#XViewPat"><span class="hs-identifier hs-var">XViewPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSplicePat"><span class="annot"><a href="GHC.Hs.Extension.html#XSplicePat"><span class="hs-identifier hs-var">XSplicePat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-296"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XLitPat"><span class="annot"><a href="GHC.Hs.Extension.html#XLitPat"><span class="hs-identifier hs-var">XLitPat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPat"><span class="hs-identifier hs-var">XNPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-299"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPat"><span class="hs-identifier hs-var">XNPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-300"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPat"><span class="hs-identifier hs-var">XNPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPlusKPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPlusKPat"><span class="hs-identifier hs-var">XNPlusKPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-303"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPlusKPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPlusKPat"><span class="hs-identifier hs-var">XNPlusKPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-304"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XNPlusKPat"><span class="annot"><a href="GHC.Hs.Extension.html#XNPlusKPat"><span class="hs-identifier hs-var">XNPlusKPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSigPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSigPat"><span class="hs-identifier hs-var">XSigPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-307"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSigPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSigPat"><span class="hs-identifier hs-var">XSigPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-type">NoExtField</span></a></span><span>
</span><span id="line-308"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XSigPat"><span class="annot"><a href="GHC.Hs.Extension.html#XSigPat"><span class="hs-identifier hs-var">XSigPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XXPat"><span class="annot"><a href="GHC.Hs.Extension.html#XXPat"><span class="hs-identifier hs-var">XXPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtCon"><span class="hs-identifier hs-type">NoExtCon</span></a></span><span>
</span><span id="line-311"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XXPat"><span class="annot"><a href="GHC.Hs.Extension.html#XXPat"><span class="hs-identifier hs-var">XXPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#NoExtCon"><span class="hs-identifier hs-type">NoExtCon</span></a></span><span>
</span><span id="line-312"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="XXPat"><span class="annot"><a href="GHC.Hs.Extension.html#XXPat"><span class="hs-identifier hs-var">XXPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-comment">-- After typechecking, we add one extra constructor: CoPat</span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">family</span><span> </span><span id="ConLikeP"><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier hs-var">ConLikeP</span></a></span></span><span> </span><span id="local-6989586621680883540"><span class="annot"><a href="#local-6989586621680883540"><span class="hs-identifier hs-type">x</span></a></span></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="ConLikeP"><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier hs-var">ConLikeP</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-comment">-- IdP GhcPs</span><span>
</span><span id="line-318"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="ConLikeP"><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier hs-var">ConLikeP</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-comment">-- IdP GhcRn</span><span>
</span><span id="line-319"></span><span class="hs-keyword">type</span><span> </span><span class="hs-keyword">instance</span><span> </span><span id="ConLikeP"><span class="annot"><a href="GHC.Hs.Pat.html#ConLikeP"><span class="hs-identifier hs-var">ConLikeP</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html#ConLike"><span class="hs-identifier hs-type">ConLike</span></a></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- ---------------------------------------------------------------------</span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span class="hs-comment">-- | Haskell Constructor Pattern Details</span><span>
</span><span id="line-325"></span><span class="hs-keyword">type</span><span> </span><span id="HsConPatDetails"><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-var">HsConPatDetails</span></a></span></span><span> </span><span id="local-6989586621680883539"><span class="annot"><a href="#local-6989586621680883539"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsConDetails"><span class="hs-identifier hs-type">HsConDetails</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883539"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883539"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883539"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span id="local-6989586621680883981"><span class="annot"><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-type">hsConPatArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-type">HsConPatDetails</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883981"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883981"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-328"></span><span id="hsConPatArgs"><span class="annot"><span class="annottext">hsConPatArgs :: forall p. HsConPatDetails p -&gt; [LPat p]
</span><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-var hs-var">hsConPatArgs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-type">PrefixCon</span></a></span><span> </span><span id="local-6989586621680883537"><span class="annot"><span class="annottext">[LPat p]
</span><a href="#local-6989586621680883537"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LPat p]
</span><a href="#local-6989586621680883537"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-329"></span><span class="annot"><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-var">hsConPatArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span id="local-6989586621680883535"><span class="annot"><span class="annottext">HsRecFields p (LPat p)
</span><a href="#local-6989586621680883535"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p)) -&gt; LPat p)
-&gt; [GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p))]
-&gt; [LPat p]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField' (FieldOcc p) (LPat p) -&gt; LPat p
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField' (FieldOcc p) (LPat p) -&gt; LPat p)
-&gt; (GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p))
    -&gt; HsRecField' (FieldOcc p) (LPat p))
-&gt; GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p))
-&gt; LPat p
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p))
-&gt; HsRecField' (FieldOcc p) (LPat p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecFields p (LPat p)
-&gt; [GenLocated SrcSpan (HsRecField' (FieldOcc p) (LPat p))]
forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var hs-var">rec_flds</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields p (LPat p)
</span><a href="#local-6989586621680883535"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-var">hsConPatArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621680883529"><span class="annot"><span class="annottext">LPat p
</span><a href="#local-6989586621680883529"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621680883528"><span class="annot"><span class="annottext">LPat p
</span><a href="#local-6989586621680883528"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LPat p
</span><a href="#local-6989586621680883529"><span class="hs-identifier hs-var">p1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">LPat p
</span><a href="#local-6989586621680883528"><span class="hs-identifier hs-var">p2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span class="hs-comment">-- | This is the extension field for ConPat, added after typechecking</span><span>
</span><span id="line-333"></span><span class="hs-comment">-- It adds quite a few extra fields, to support elaboration of pattern matching.</span><span>
</span><span id="line-334"></span><span class="hs-keyword">data</span><span> </span><span id="ConPatTc"><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-var">ConPatTc</span></a></span></span><span>
</span><span id="line-335"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ConPatTc"><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-var">ConPatTc</span></a></span></span><span>
</span><span id="line-336"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- | The universal arg types  1-1 with the universal</span><span>
</span><span id="line-337"></span><span>      </span><span class="hs-comment">-- tyvars of the constructor/pattern synonym</span><span>
</span><span id="line-338"></span><span>      </span><span class="hs-comment">-- Use (conLikeResTy pat_con cpt_arg_tys) to get</span><span>
</span><span id="line-339"></span><span>      </span><span class="hs-comment">-- the type of the pattern</span><span>
</span><span id="line-340"></span><span>      </span><span id="cpt_arg_tys"><span class="annot"><span class="annottext">ConPatTc -&gt; [Type]
</span><a href="GHC.Hs.Pat.html#cpt_arg_tys"><span class="hs-identifier hs-var hs-var">cpt_arg_tys</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | Existentially bound type variables</span><span>
</span><span id="line-343"></span><span>      </span><span class="hs-comment">-- in correctly-scoped order e.g. [k:*  x:k]</span><span>
</span><span id="line-344"></span><span>      </span><span id="cpt_tvs"><span class="annot"><span class="annottext">ConPatTc -&gt; [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_tvs"><span class="hs-identifier hs-var hs-var">cpt_tvs</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | Ditto *coercion variables* and *dictionaries*</span><span>
</span><span id="line-347"></span><span>      </span><span class="hs-comment">-- One reason for putting coercion variable here  I think</span><span>
</span><span id="line-348"></span><span>      </span><span class="hs-comment">--      is to ensure their kinds are zonked</span><span>
</span><span id="line-349"></span><span>      </span><span id="cpt_dicts"><span class="annot"><span class="annottext">ConPatTc -&gt; [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_dicts"><span class="hs-identifier hs-var hs-var">cpt_dicts</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#EvVar"><span class="hs-identifier hs-type">EvVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | Bindings involving those dictionaries</span><span>
</span><span id="line-352"></span><span>      </span><span id="cpt_binds"><span class="annot"><span class="annottext">ConPatTc -&gt; TcEvBinds
</span><a href="GHC.Hs.Pat.html#cpt_binds"><span class="hs-identifier hs-var hs-var">cpt_binds</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#TcEvBinds"><span class="hs-identifier hs-type">TcEvBinds</span></a></span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- ^ Extra wrapper to pass to the matcher</span><span>
</span><span id="line-355"></span><span>      </span><span class="hs-comment">-- Only relevant for pattern-synonyms;</span><span>
</span><span id="line-356"></span><span>      </span><span class="hs-comment">--   ignored for data cons</span><span>
</span><span id="line-357"></span><span>      </span><span id="cpt_wrap"><span class="annot"><span class="annottext">ConPatTc -&gt; HsWrapper
</span><a href="GHC.Hs.Pat.html#cpt_wrap"><span class="hs-identifier hs-var hs-var">cpt_wrap</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#HsWrapper"><span class="hs-identifier hs-type">HsWrapper</span></a></span><span>
</span><span id="line-358"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="hs-comment">-- | Coercion Pattern (translation only)</span><span>
</span><span id="line-361"></span><span class="hs-comment">--</span><span>
</span><span id="line-362"></span><span class="hs-comment">-- During desugaring a (CoPat co pat) turns into a cast with 'co' on the</span><span>
</span><span id="line-363"></span><span class="hs-comment">-- scrutinee, followed by a match on 'pat'.</span><span>
</span><span id="line-364"></span><span class="hs-keyword">data</span><span> </span><span id="CoPat"><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-var">CoPat</span></a></span></span><span>
</span><span id="line-365"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CoPat"><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-var">CoPat</span></a></span></span><span>
</span><span id="line-366"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- | Coercion Pattern</span><span>
</span><span id="line-367"></span><span>      </span><span class="hs-comment">-- If co :: t1 ~ t2, p :: t2,</span><span>
</span><span id="line-368"></span><span>      </span><span class="hs-comment">-- then (CoPat co p) :: t1</span><span>
</span><span id="line-369"></span><span>      </span><span id="co_cpt_wrap"><span class="annot"><span class="annottext">CoPat -&gt; HsWrapper
</span><a href="GHC.Hs.Pat.html#co_cpt_wrap"><span class="hs-identifier hs-var hs-var">co_cpt_wrap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#HsWrapper"><span class="hs-identifier hs-type">HsWrapper</span></a></span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | Why not LPat?  Ans: existing locn will do</span><span>
</span><span id="line-372"></span><span>      </span><span id="co_pat_inner"><span class="annot"><span class="annottext">CoPat -&gt; Pat GhcTc
</span><a href="GHC.Hs.Pat.html#co_pat_inner"><span class="hs-identifier hs-var hs-var">co_pat_inner</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span>
</span><span id="line-373"></span><span>
</span><span id="line-374"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | Type of whole pattern, t1</span><span>
</span><span id="line-375"></span><span>      </span><span id="co_pat_ty"><span class="annot"><span class="annottext">CoPat -&gt; Type
</span><a href="GHC.Hs.Pat.html#co_pat_ty"><span class="hs-identifier hs-var hs-var">co_pat_ty</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-376"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="hs-comment">-- | Haskell Record Fields</span><span>
</span><span id="line-379"></span><span class="hs-comment">--</span><span>
</span><span id="line-380"></span><span class="hs-comment">-- HsRecFields is used only for patterns and expressions (not data type</span><span>
</span><span id="line-381"></span><span class="hs-comment">-- declarations)</span><span>
</span><span id="line-382"></span><span class="hs-keyword">data</span><span> </span><span id="HsRecFields"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-var">HsRecFields</span></a></span></span><span> </span><span id="local-6989586621680883966"><span class="annot"><a href="#local-6989586621680883966"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span id="local-6989586621680883965"><span class="annot"><a href="#local-6989586621680883965"><span class="hs-identifier hs-type">arg</span></a></span></span><span>         </span><span class="hs-comment">-- A bunch of record fields</span><span>
</span><span id="line-383"></span><span>                                </span><span class="hs-comment">--      { x = 3, y = True }</span><span>
</span><span id="line-384"></span><span>        </span><span class="hs-comment">-- Used for both expressions and patterns</span><span>
</span><span id="line-385"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="HsRecFields"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-var">HsRecFields</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="rec_flds"><span class="annot"><span class="annottext">forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var hs-var">rec_flds</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883966"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883965"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-386"></span><span>                  </span><span id="rec_dotdot"><span class="annot"><span class="annottext">forall p arg. HsRecFields p arg -&gt; Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var hs-var">rec_dotdot</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>  </span><span class="hs-comment">-- Note [DotDot fields]</span><span>
</span><span id="line-387"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680883505"><span id="local-6989586621680883513"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; HsRecFields p a -&gt; HsRecFields p b)
-&gt; (forall a b. a -&gt; HsRecFields p b -&gt; HsRecFields p a)
-&gt; Functor (HsRecFields p)
forall a b. a -&gt; HsRecFields p b -&gt; HsRecFields p a
forall a b. (a -&gt; b) -&gt; HsRecFields p a -&gt; HsRecFields p b
forall p a b. a -&gt; HsRecFields p b -&gt; HsRecFields p a
forall p a b. (a -&gt; b) -&gt; HsRecFields p a -&gt; HsRecFields p b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; HsRecFields p b -&gt; HsRecFields p a
$c&lt;$ :: forall p a b. a -&gt; HsRecFields p b -&gt; HsRecFields p a
fmap :: forall a b. (a -&gt; b) -&gt; HsRecFields p a -&gt; HsRecFields p b
$cfmap :: forall p a b. (a -&gt; b) -&gt; HsRecFields p a -&gt; HsRecFields p b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680883451"><span id="local-6989586621680883453"><span id="local-6989586621680883455"><span id="local-6989586621680883457"><span id="local-6989586621680883459"><span id="local-6989586621680883461"><span id="local-6989586621680883466"><span id="local-6989586621680883468"><span id="local-6989586621680883470"><span id="local-6989586621680883472"><span id="local-6989586621680883474"><span id="local-6989586621680883476"><span id="local-6989586621680883478"><span id="local-6989586621680883483"><span id="local-6989586621680883485"><span id="local-6989586621680883496"><span id="local-6989586621680883498"><span class="annot"><span class="annottext">(forall m. Monoid m =&gt; HsRecFields p m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a)
-&gt; (forall a. HsRecFields p a -&gt; [a])
-&gt; (forall a. HsRecFields p a -&gt; Bool)
-&gt; (forall a. HsRecFields p a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; HsRecFields p a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; HsRecFields p a -&gt; a)
-&gt; (forall a. Ord a =&gt; HsRecFields p a -&gt; a)
-&gt; (forall a. Num a =&gt; HsRecFields p a -&gt; a)
-&gt; (forall a. Num a =&gt; HsRecFields p a -&gt; a)
-&gt; Foldable (HsRecFields p)
forall a. Eq a =&gt; a -&gt; HsRecFields p a -&gt; Bool
forall a. Num a =&gt; HsRecFields p a -&gt; a
forall a. Ord a =&gt; HsRecFields p a -&gt; a
forall m. Monoid m =&gt; HsRecFields p m -&gt; m
forall a. HsRecFields p a -&gt; Bool
forall a. HsRecFields p a -&gt; Int
forall a. HsRecFields p a -&gt; [a]
forall a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
forall p a. Eq a =&gt; a -&gt; HsRecFields p a -&gt; Bool
forall p a. Num a =&gt; HsRecFields p a -&gt; a
forall p a. Ord a =&gt; HsRecFields p a -&gt; a
forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
forall p m. Monoid m =&gt; HsRecFields p m -&gt; m
forall p a. HsRecFields p a -&gt; Bool
forall p a. HsRecFields p a -&gt; Int
forall p a. HsRecFields p a -&gt; [a]
forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
forall p a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
forall p m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
forall p b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
forall p a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
forall (t :: * -&gt; *).
(forall m. Monoid m =&gt; t m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. t a -&gt; [a])
-&gt; (forall a. t a -&gt; Bool)
-&gt; (forall a. t a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; t a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; Foldable t
product :: forall a. Num a =&gt; HsRecFields p a -&gt; a
$cproduct :: forall p a. Num a =&gt; HsRecFields p a -&gt; a
sum :: forall a. Num a =&gt; HsRecFields p a -&gt; a
$csum :: forall p a. Num a =&gt; HsRecFields p a -&gt; a
minimum :: forall a. Ord a =&gt; HsRecFields p a -&gt; a
$cminimum :: forall p a. Ord a =&gt; HsRecFields p a -&gt; a
maximum :: forall a. Ord a =&gt; HsRecFields p a -&gt; a
$cmaximum :: forall p a. Ord a =&gt; HsRecFields p a -&gt; a
elem :: forall a. Eq a =&gt; a -&gt; HsRecFields p a -&gt; Bool
$celem :: forall p a. Eq a =&gt; a -&gt; HsRecFields p a -&gt; Bool
length :: forall a. HsRecFields p a -&gt; Int
$clength :: forall p a. HsRecFields p a -&gt; Int
null :: forall a. HsRecFields p a -&gt; Bool
$cnull :: forall p a. HsRecFields p a -&gt; Bool
toList :: forall a. HsRecFields p a -&gt; [a]
$ctoList :: forall p a. HsRecFields p a -&gt; [a]
foldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
$cfoldl1 :: forall p a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
foldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
$cfoldr1 :: forall p a. (a -&gt; a -&gt; a) -&gt; HsRecFields p a -&gt; a
foldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
$cfoldl' :: forall p b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
foldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
$cfoldl :: forall p b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
foldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
$cfoldr' :: forall p a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
foldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
$cfoldr :: forall p a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecFields p a -&gt; b
foldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
$cfoldMap' :: forall p m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
$cfoldMap :: forall p m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecFields p a -&gt; m
fold :: forall m. Monoid m =&gt; HsRecFields p m -&gt; m
$cfold :: forall p m. Monoid m =&gt; HsRecFields p m -&gt; m
</span><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Foldable</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680883427"><span id="local-6989586621680883429"><span id="local-6989586621680883431"><span id="local-6989586621680883444"><span class="annot"><span class="annottext">Functor (HsRecFields p)
Foldable (HsRecFields p)
Functor (HsRecFields p)
-&gt; Foldable (HsRecFields p)
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; HsRecFields p a -&gt; f (HsRecFields p b))
-&gt; (forall (f :: * -&gt; *) a.
    Applicative f =&gt;
    HsRecFields p (f a) -&gt; f (HsRecFields p a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; HsRecFields p a -&gt; m (HsRecFields p b))
-&gt; (forall (m :: * -&gt; *) a.
    Monad m =&gt;
    HsRecFields p (m a) -&gt; m (HsRecFields p a))
-&gt; Traversable (HsRecFields p)
forall p. Functor (HsRecFields p)
forall p. Foldable (HsRecFields p)
forall p (m :: * -&gt; *) a.
Monad m =&gt;
HsRecFields p (m a) -&gt; m (HsRecFields p a)
forall p (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecFields p (f a) -&gt; f (HsRecFields p a)
forall p (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecFields p a -&gt; m (HsRecFields p b)
forall p (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecFields p a -&gt; f (HsRecFields p b)
forall (t :: * -&gt; *).
Functor t
-&gt; Foldable t
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; t a -&gt; f (t b))
-&gt; (forall (f :: * -&gt; *) a. Applicative f =&gt; t (f a) -&gt; f (t a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; t a -&gt; m (t b))
-&gt; (forall (m :: * -&gt; *) a. Monad m =&gt; t (m a) -&gt; m (t a))
-&gt; Traversable t
forall (m :: * -&gt; *) a.
Monad m =&gt;
HsRecFields p (m a) -&gt; m (HsRecFields p a)
forall (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecFields p (f a) -&gt; f (HsRecFields p a)
forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecFields p a -&gt; m (HsRecFields p b)
forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecFields p a -&gt; f (HsRecFields p b)
sequence :: forall (m :: * -&gt; *) a.
Monad m =&gt;
HsRecFields p (m a) -&gt; m (HsRecFields p a)
$csequence :: forall p (m :: * -&gt; *) a.
Monad m =&gt;
HsRecFields p (m a) -&gt; m (HsRecFields p a)
mapM :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecFields p a -&gt; m (HsRecFields p b)
$cmapM :: forall p (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecFields p a -&gt; m (HsRecFields p b)
sequenceA :: forall (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecFields p (f a) -&gt; f (HsRecFields p a)
$csequenceA :: forall p (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecFields p (f a) -&gt; f (HsRecFields p a)
traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecFields p a -&gt; f (HsRecFields p b)
$ctraverse :: forall p (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecFields p a -&gt; f (HsRecFields p b)
</span><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Traversable</span></a></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-388"></span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="hs-comment">-- Note [DotDot fields]</span><span>
</span><span id="line-391"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-392"></span><span class="hs-comment">-- The rec_dotdot field means this:</span><span>
</span><span id="line-393"></span><span class="hs-comment">--   Nothing =&gt; the normal case</span><span>
</span><span id="line-394"></span><span class="hs-comment">--   Just n  =&gt; the group uses &quot;..&quot; notation,</span><span>
</span><span id="line-395"></span><span class="hs-comment">--</span><span>
</span><span id="line-396"></span><span class="hs-comment">-- In the latter case:</span><span>
</span><span id="line-397"></span><span class="hs-comment">--</span><span>
</span><span id="line-398"></span><span class="hs-comment">--   *before* renamer: rec_flds are exactly the n user-written fields</span><span>
</span><span id="line-399"></span><span class="hs-comment">--</span><span>
</span><span id="line-400"></span><span class="hs-comment">--   *after* renamer:  rec_flds includes *all* fields, with</span><span>
</span><span id="line-401"></span><span class="hs-comment">--                     the first 'n' being the user-written ones</span><span>
</span><span id="line-402"></span><span class="hs-comment">--                     and the remainder being 'filled in' implicitly</span><span>
</span><span id="line-403"></span><span>
</span><span id="line-404"></span><span class="hs-comment">-- | Located Haskell Record Field</span><span>
</span><span id="line-405"></span><span class="hs-keyword">type</span><span> </span><span id="LHsRecField%27"><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField%27"><span class="hs-identifier hs-var">LHsRecField'</span></a></span></span><span> </span><span id="local-6989586621680883424"><span class="annot"><a href="#local-6989586621680883424"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span id="local-6989586621680883423"><span class="annot"><a href="#local-6989586621680883423"><span class="hs-identifier hs-type">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883424"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883423"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span>
</span><span id="line-407"></span><span class="hs-comment">-- | Located Haskell Record Field</span><span>
</span><span id="line-408"></span><span class="hs-keyword">type</span><span> </span><span id="LHsRecField"><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-var">LHsRecField</span></a></span></span><span>  </span><span id="local-6989586621680883422"><span class="annot"><a href="#local-6989586621680883422"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span id="local-6989586621680883421"><span class="annot"><a href="#local-6989586621680883421"><span class="hs-identifier hs-type">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span>  </span><span class="annot"><a href="#local-6989586621680883422"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883421"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span class="hs-comment">-- | Located Haskell Record Update Field</span><span>
</span><span id="line-411"></span><span class="hs-keyword">type</span><span> </span><span id="LHsRecUpdField"><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-var">LHsRecUpdField</span></a></span></span><span> </span><span id="local-6989586621680883420"><span class="annot"><a href="#local-6989586621680883420"><span class="hs-identifier hs-type">p</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecUpdField"><span class="hs-identifier hs-type">HsRecUpdField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883420"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="hs-comment">-- | Haskell Record Field</span><span>
</span><span id="line-414"></span><span class="hs-keyword">type</span><span> </span><span id="HsRecField"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-var">HsRecField</span></a></span></span><span>    </span><span id="local-6989586621680883419"><span class="annot"><a href="#local-6989586621680883419"><span class="hs-identifier hs-type">p</span></a></span></span><span> </span><span id="local-6989586621680883418"><span class="annot"><a href="#local-6989586621680883418"><span class="hs-identifier hs-type">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-type">FieldOcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883419"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621680883418"><span class="hs-identifier hs-type">arg</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span class="hs-comment">-- | Haskell Record Update Field</span><span>
</span><span id="line-417"></span><span class="hs-keyword">type</span><span> </span><span id="HsRecUpdField"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecUpdField"><span class="hs-identifier hs-var">HsRecUpdField</span></a></span></span><span> </span><span id="local-6989586621680883417"><span class="annot"><a href="#local-6989586621680883417"><span class="hs-identifier hs-type">p</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#AmbiguousFieldOcc"><span class="hs-identifier hs-type">AmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883417"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883417"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span class="hs-comment">-- | Haskell Record Field</span><span>
</span><span id="line-420"></span><span class="hs-comment">--</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnEqual',</span><span>
</span><span id="line-422"></span><span class="hs-comment">--</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-424"></span><span class="hs-keyword">data</span><span> </span><span id="HsRecField%27"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-var">HsRecField'</span></a></span></span><span> </span><span id="local-6989586621680883973"><span class="annot"><a href="#local-6989586621680883973"><span class="hs-identifier hs-type">id</span></a></span></span><span> </span><span id="local-6989586621680883972"><span class="annot"><a href="#local-6989586621680883972"><span class="hs-identifier hs-type">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="HsRecField"><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-var">HsRecField</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-425"></span><span>        </span><span id="hsRecFieldLbl"><span class="annot"><span class="annottext">forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883973"><span class="hs-identifier hs-type">id</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-426"></span><span>        </span><span id="hsRecFieldArg"><span class="annot"><span class="annottext">forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680883972"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">,</span><span>           </span><span class="hs-comment">-- ^ Filled in by renamer when punning</span><span>
</span><span id="line-427"></span><span>        </span><span id="hsRecPun"><span class="annot"><span class="annottext">forall id arg. HsRecField' id arg -&gt; Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var hs-var">hsRecPun</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>           </span><span class="hs-comment">-- ^ Note [Punning]</span><span>
</span><span id="line-428"></span><span>  </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680883368"><span id="local-6989586621680883370"><span id="local-6989586621680883372"><span id="local-6989586621680883374"><span id="local-6989586621680883376"><span id="local-6989586621680883378"><span id="local-6989586621680883380"><span id="local-6989586621680883382"><span id="local-6989586621680883389"><span id="local-6989586621680883391"><span id="local-6989586621680883393"><span id="local-6989586621680883395"><span id="local-6989586621680883401"><span id="local-6989586621680883409"><span class="annot"><span class="annottext">Typeable (HsRecField' id arg)
Typeable (HsRecField' id arg)
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g)
    -&gt; HsRecField' id arg
    -&gt; c (HsRecField' id arg))
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (HsRecField' id arg))
-&gt; (HsRecField' id arg -&gt; Constr)
-&gt; (HsRecField' id arg -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (HsRecField' id arg)))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c (HsRecField' id arg)))
-&gt; ((forall b. Data b =&gt; b -&gt; b)
    -&gt; HsRecField' id arg -&gt; HsRecField' id arg)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r)
-&gt; (forall u.
    (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; HsRecField' id arg -&gt; m (HsRecField' id arg))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; HsRecField' id arg -&gt; m (HsRecField' id arg))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; HsRecField' id arg -&gt; m (HsRecField' id arg))
-&gt; Data (HsRecField' id arg)
HsRecField' id arg -&gt; DataType
HsRecField' id arg -&gt; Constr
(forall b. Data b =&gt; b -&gt; b)
-&gt; HsRecField' id arg -&gt; HsRecField' id arg
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u.
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; [u]
forall {id} {arg}.
(Data id, Data arg) =&gt;
Typeable (HsRecField' id arg)
forall id arg.
(Data id, Data arg) =&gt;
HsRecField' id arg -&gt; DataType
forall id arg. (Data id, Data arg) =&gt; HsRecField' id arg -&gt; Constr
forall id arg.
(Data id, Data arg) =&gt;
(forall b. Data b =&gt; b -&gt; b)
-&gt; HsRecField' id arg -&gt; HsRecField' id arg
forall id arg u.
(Data id, Data arg) =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; u
forall id arg u.
(Data id, Data arg) =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; [u]
forall id arg r r'.
(Data id, Data arg) =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
forall id arg r r'.
(Data id, Data arg) =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
forall id arg (m :: * -&gt; *).
(Data id, Data arg, Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
forall id arg (m :: * -&gt; *).
(Data id, Data arg, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
forall id arg (c :: * -&gt; *).
(Data id, Data arg) =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (HsRecField' id arg)
forall id arg (c :: * -&gt; *).
(Data id, Data arg) =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; HsRecField' id arg
-&gt; c (HsRecField' id arg)
forall id arg (t :: * -&gt; *) (c :: * -&gt; *).
(Data id, Data arg, Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (HsRecField' id arg))
forall id arg (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
(Data id, Data arg, Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (HsRecField' id arg))
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (HsRecField' id arg)
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; HsRecField' id arg
-&gt; c (HsRecField' id arg)
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (HsRecField' id arg))
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (HsRecField' id arg))
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
$cgmapMo :: forall id arg (m :: * -&gt; *).
(Data id, Data arg, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
$cgmapMp :: forall id arg (m :: * -&gt; *).
(Data id, Data arg, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
$cgmapM :: forall id arg (m :: * -&gt; *).
(Data id, Data arg, Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; HsRecField' id arg -&gt; m (HsRecField' id arg)
gmapQi :: forall u.
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; u
$cgmapQi :: forall id arg u.
(Data id, Data arg) =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; [u]
$cgmapQ :: forall id arg u.
(Data id, Data arg) =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; HsRecField' id arg -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
$cgmapQr :: forall id arg r r'.
(Data id, Data arg) =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
$cgmapQl :: forall id arg r r'.
(Data id, Data arg) =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsRecField' id arg -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b)
-&gt; HsRecField' id arg -&gt; HsRecField' id arg
$cgmapT :: forall id arg.
(Data id, Data arg) =&gt;
(forall b. Data b =&gt; b -&gt; b)
-&gt; HsRecField' id arg -&gt; HsRecField' id arg
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (HsRecField' id arg))
$cdataCast2 :: forall id arg (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
(Data id, Data arg, Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (HsRecField' id arg))
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (HsRecField' id arg))
$cdataCast1 :: forall id arg (t :: * -&gt; *) (c :: * -&gt; *).
(Data id, Data arg, Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (HsRecField' id arg))
dataTypeOf :: HsRecField' id arg -&gt; DataType
$cdataTypeOf :: forall id arg.
(Data id, Data arg) =&gt;
HsRecField' id arg -&gt; DataType
toConstr :: HsRecField' id arg -&gt; Constr
$ctoConstr :: forall id arg. (Data id, Data arg) =&gt; HsRecField' id arg -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (HsRecField' id arg)
$cgunfold :: forall id arg (c :: * -&gt; *).
(Data id, Data arg) =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (HsRecField' id arg)
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; HsRecField' id arg
-&gt; c (HsRecField' id arg)
$cgfoldl :: forall id arg (c :: * -&gt; *).
(Data id, Data arg) =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; HsRecField' id arg
-&gt; c (HsRecField' id arg)
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680883361"><span id="local-6989586621680883363"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; HsRecField' id a -&gt; HsRecField' id b)
-&gt; (forall a b. a -&gt; HsRecField' id b -&gt; HsRecField' id a)
-&gt; Functor (HsRecField' id)
forall a b. a -&gt; HsRecField' id b -&gt; HsRecField' id a
forall a b. (a -&gt; b) -&gt; HsRecField' id a -&gt; HsRecField' id b
forall id a b. a -&gt; HsRecField' id b -&gt; HsRecField' id a
forall id a b. (a -&gt; b) -&gt; HsRecField' id a -&gt; HsRecField' id b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; HsRecField' id b -&gt; HsRecField' id a
$c&lt;$ :: forall id a b. a -&gt; HsRecField' id b -&gt; HsRecField' id a
fmap :: forall a b. (a -&gt; b) -&gt; HsRecField' id a -&gt; HsRecField' id b
$cfmap :: forall id a b. (a -&gt; b) -&gt; HsRecField' id a -&gt; HsRecField' id b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680883326"><span id="local-6989586621680883328"><span id="local-6989586621680883330"><span id="local-6989586621680883332"><span id="local-6989586621680883334"><span id="local-6989586621680883336"><span id="local-6989586621680883338"><span id="local-6989586621680883340"><span id="local-6989586621680883342"><span id="local-6989586621680883344"><span id="local-6989586621680883346"><span id="local-6989586621680883348"><span id="local-6989586621680883350"><span id="local-6989586621680883352"><span id="local-6989586621680883354"><span id="local-6989586621680883357"><span id="local-6989586621680883359"><span class="annot"><span class="annottext">(forall m. Monoid m =&gt; HsRecField' id m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a)
-&gt; (forall a. HsRecField' id a -&gt; [a])
-&gt; (forall a. HsRecField' id a -&gt; Bool)
-&gt; (forall a. HsRecField' id a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; HsRecField' id a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; HsRecField' id a -&gt; a)
-&gt; (forall a. Ord a =&gt; HsRecField' id a -&gt; a)
-&gt; (forall a. Num a =&gt; HsRecField' id a -&gt; a)
-&gt; (forall a. Num a =&gt; HsRecField' id a -&gt; a)
-&gt; Foldable (HsRecField' id)
forall a. Eq a =&gt; a -&gt; HsRecField' id a -&gt; Bool
forall a. Num a =&gt; HsRecField' id a -&gt; a
forall a. Ord a =&gt; HsRecField' id a -&gt; a
forall m. Monoid m =&gt; HsRecField' id m -&gt; m
forall a. HsRecField' id a -&gt; Bool
forall a. HsRecField' id a -&gt; Int
forall a. HsRecField' id a -&gt; [a]
forall a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
forall id a. Eq a =&gt; a -&gt; HsRecField' id a -&gt; Bool
forall id a. Num a =&gt; HsRecField' id a -&gt; a
forall id a. Ord a =&gt; HsRecField' id a -&gt; a
forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
forall id m. Monoid m =&gt; HsRecField' id m -&gt; m
forall id arg. HsRecField' id arg -&gt; Bool
forall id a. HsRecField' id a -&gt; Int
forall id a. HsRecField' id a -&gt; [a]
forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
forall id a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
forall id m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
forall id b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
forall id a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
forall (t :: * -&gt; *).
(forall m. Monoid m =&gt; t m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. t a -&gt; [a])
-&gt; (forall a. t a -&gt; Bool)
-&gt; (forall a. t a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; t a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; Foldable t
product :: forall a. Num a =&gt; HsRecField' id a -&gt; a
$cproduct :: forall id a. Num a =&gt; HsRecField' id a -&gt; a
sum :: forall a. Num a =&gt; HsRecField' id a -&gt; a
$csum :: forall id a. Num a =&gt; HsRecField' id a -&gt; a
minimum :: forall a. Ord a =&gt; HsRecField' id a -&gt; a
$cminimum :: forall id a. Ord a =&gt; HsRecField' id a -&gt; a
maximum :: forall a. Ord a =&gt; HsRecField' id a -&gt; a
$cmaximum :: forall id a. Ord a =&gt; HsRecField' id a -&gt; a
elem :: forall a. Eq a =&gt; a -&gt; HsRecField' id a -&gt; Bool
$celem :: forall id a. Eq a =&gt; a -&gt; HsRecField' id a -&gt; Bool
length :: forall a. HsRecField' id a -&gt; Int
$clength :: forall id a. HsRecField' id a -&gt; Int
null :: forall a. HsRecField' id a -&gt; Bool
$cnull :: forall id arg. HsRecField' id arg -&gt; Bool
toList :: forall a. HsRecField' id a -&gt; [a]
$ctoList :: forall id a. HsRecField' id a -&gt; [a]
foldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
$cfoldl1 :: forall id a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
foldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
$cfoldr1 :: forall id a. (a -&gt; a -&gt; a) -&gt; HsRecField' id a -&gt; a
foldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
$cfoldl' :: forall id b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
foldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
$cfoldl :: forall id b a. (b -&gt; a -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
foldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
$cfoldr' :: forall id a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
foldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
$cfoldr :: forall id a b. (a -&gt; b -&gt; b) -&gt; b -&gt; HsRecField' id a -&gt; b
foldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
$cfoldMap' :: forall id m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
$cfoldMap :: forall id m a. Monoid m =&gt; (a -&gt; m) -&gt; HsRecField' id a -&gt; m
fold :: forall m. Monoid m =&gt; HsRecField' id m -&gt; m
$cfold :: forall id m. Monoid m =&gt; HsRecField' id m -&gt; m
</span><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Foldable</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680883311"><span id="local-6989586621680883313"><span id="local-6989586621680883315"><span id="local-6989586621680883320"><span class="annot"><span class="annottext">Functor (HsRecField' id)
Foldable (HsRecField' id)
Functor (HsRecField' id)
-&gt; Foldable (HsRecField' id)
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; HsRecField' id a -&gt; f (HsRecField' id b))
-&gt; (forall (f :: * -&gt; *) a.
    Applicative f =&gt;
    HsRecField' id (f a) -&gt; f (HsRecField' id a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; HsRecField' id a -&gt; m (HsRecField' id b))
-&gt; (forall (m :: * -&gt; *) a.
    Monad m =&gt;
    HsRecField' id (m a) -&gt; m (HsRecField' id a))
-&gt; Traversable (HsRecField' id)
forall id. Functor (HsRecField' id)
forall id. Foldable (HsRecField' id)
forall id (m :: * -&gt; *) a.
Monad m =&gt;
HsRecField' id (m a) -&gt; m (HsRecField' id a)
forall id (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecField' id (f a) -&gt; f (HsRecField' id a)
forall id (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecField' id a -&gt; m (HsRecField' id b)
forall id (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecField' id a -&gt; f (HsRecField' id b)
forall (t :: * -&gt; *).
Functor t
-&gt; Foldable t
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; t a -&gt; f (t b))
-&gt; (forall (f :: * -&gt; *) a. Applicative f =&gt; t (f a) -&gt; f (t a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; t a -&gt; m (t b))
-&gt; (forall (m :: * -&gt; *) a. Monad m =&gt; t (m a) -&gt; m (t a))
-&gt; Traversable t
forall (m :: * -&gt; *) a.
Monad m =&gt;
HsRecField' id (m a) -&gt; m (HsRecField' id a)
forall (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecField' id (f a) -&gt; f (HsRecField' id a)
forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecField' id a -&gt; m (HsRecField' id b)
forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecField' id a -&gt; f (HsRecField' id b)
sequence :: forall (m :: * -&gt; *) a.
Monad m =&gt;
HsRecField' id (m a) -&gt; m (HsRecField' id a)
$csequence :: forall id (m :: * -&gt; *) a.
Monad m =&gt;
HsRecField' id (m a) -&gt; m (HsRecField' id a)
mapM :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecField' id a -&gt; m (HsRecField' id b)
$cmapM :: forall id (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; HsRecField' id a -&gt; m (HsRecField' id b)
sequenceA :: forall (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecField' id (f a) -&gt; f (HsRecField' id a)
$csequenceA :: forall id (f :: * -&gt; *) a.
Applicative f =&gt;
HsRecField' id (f a) -&gt; f (HsRecField' id a)
traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecField' id a -&gt; f (HsRecField' id b)
$ctraverse :: forall id (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; HsRecField' id a -&gt; f (HsRecField' id b)
</span><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Traversable</span></a></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span class="hs-comment">-- Note [Punning]</span><span>
</span><span id="line-432"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~</span><span>
</span><span id="line-433"></span><span class="hs-comment">-- If you write T { x, y = v+1 }, the HsRecFields will be</span><span>
</span><span id="line-434"></span><span class="hs-comment">--      HsRecField x x True ...</span><span>
</span><span id="line-435"></span><span class="hs-comment">--      HsRecField y (v+1) False ...</span><span>
</span><span id="line-436"></span><span class="hs-comment">-- That is, for &quot;punned&quot; field x is expanded (in the renamer)</span><span>
</span><span id="line-437"></span><span class="hs-comment">-- to x=x; but with a punning flag so we can detect it later</span><span>
</span><span id="line-438"></span><span class="hs-comment">-- (e.g. when pretty printing)</span><span>
</span><span id="line-439"></span><span class="hs-comment">--</span><span>
</span><span id="line-440"></span><span class="hs-comment">-- If the original field was qualified, we un-qualify it, thus</span><span>
</span><span id="line-441"></span><span class="hs-comment">--    T { A.x } means T { A.x = x }</span><span>
</span><span id="line-442"></span><span>
</span><span id="line-443"></span><span>
</span><span id="line-444"></span><span class="hs-comment">-- Note [HsRecField and HsRecUpdField]</span><span>
</span><span id="line-445"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span class="hs-comment">-- A HsRecField (used for record construction and pattern matching)</span><span>
</span><span id="line-448"></span><span class="hs-comment">-- contains an unambiguous occurrence of a field (i.e. a FieldOcc).</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- We can't just store the Name, because thanks to</span><span>
</span><span id="line-450"></span><span class="hs-comment">-- DuplicateRecordFields this may not correspond to the label the user</span><span>
</span><span id="line-451"></span><span class="hs-comment">-- wrote.</span><span>
</span><span id="line-452"></span><span class="hs-comment">--</span><span>
</span><span id="line-453"></span><span class="hs-comment">-- A HsRecUpdField (used for record update) contains a potentially</span><span>
</span><span id="line-454"></span><span class="hs-comment">-- ambiguous occurrence of a field (an AmbiguousFieldOcc).  The</span><span>
</span><span id="line-455"></span><span class="hs-comment">-- renamer will fill in the selector function if it can, but if the</span><span>
</span><span id="line-456"></span><span class="hs-comment">-- selector is ambiguous the renamer will defer to the typechecker.</span><span>
</span><span id="line-457"></span><span class="hs-comment">-- After the typechecker, a unique selector will have been determined.</span><span>
</span><span id="line-458"></span><span class="hs-comment">--</span><span>
</span><span id="line-459"></span><span class="hs-comment">-- The renamer produces an Unambiguous result if it can, rather than</span><span>
</span><span id="line-460"></span><span class="hs-comment">-- just doing the lookup in the typechecker, so that completely</span><span>
</span><span id="line-461"></span><span class="hs-comment">-- unambiguous updates can be represented by 'GHC.HsToCore.Quote.repUpdFields'.</span><span>
</span><span id="line-462"></span><span class="hs-comment">--</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- For example, suppose we have:</span><span>
</span><span id="line-464"></span><span class="hs-comment">--</span><span>
</span><span id="line-465"></span><span class="hs-comment">--     data S = MkS { x :: Int }</span><span>
</span><span id="line-466"></span><span class="hs-comment">--     data T = MkT { x :: Int }</span><span>
</span><span id="line-467"></span><span class="hs-comment">--</span><span>
</span><span id="line-468"></span><span class="hs-comment">--     f z = (z { x = 3 }) :: S</span><span>
</span><span id="line-469"></span><span class="hs-comment">--</span><span>
</span><span id="line-470"></span><span class="hs-comment">-- The parsed HsRecUpdField corresponding to the record update will have:</span><span>
</span><span id="line-471"></span><span class="hs-comment">--</span><span>
</span><span id="line-472"></span><span class="hs-comment">--     hsRecFieldLbl = Unambiguous &quot;x&quot; noExtField :: AmbiguousFieldOcc RdrName</span><span>
</span><span id="line-473"></span><span class="hs-comment">--</span><span>
</span><span id="line-474"></span><span class="hs-comment">-- After the renamer, this will become:</span><span>
</span><span id="line-475"></span><span class="hs-comment">--</span><span>
</span><span id="line-476"></span><span class="hs-comment">--     hsRecFieldLbl = Ambiguous   &quot;x&quot; noExtField :: AmbiguousFieldOcc Name</span><span>
</span><span id="line-477"></span><span class="hs-comment">--</span><span>
</span><span id="line-478"></span><span class="hs-comment">-- (note that the Unambiguous constructor is not type-correct here).</span><span>
</span><span id="line-479"></span><span class="hs-comment">-- The typechecker will determine the particular selector:</span><span>
</span><span id="line-480"></span><span class="hs-comment">--</span><span>
</span><span id="line-481"></span><span class="hs-comment">--     hsRecFieldLbl = Unambiguous &quot;x&quot; $sel:x:MkS  :: AmbiguousFieldOcc Id</span><span>
</span><span id="line-482"></span><span class="hs-comment">--</span><span>
</span><span id="line-483"></span><span class="hs-comment">-- See also Note [Disambiguating record fields] in GHC.Tc.Gen.Expr.</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span id="local-6989586621680883870"><span id="local-6989586621680883871"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFields"><span class="hs-identifier hs-type">hsRecFields</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883871"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883870"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Extension.html#XCFieldOcc"><span class="hs-identifier hs-type">XCFieldOcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883871"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-486"></span><span id="hsRecFields"><span class="annot"><span class="annottext">hsRecFields :: forall p arg. HsRecFields p arg -&gt; [XCFieldOcc p]
</span><a href="GHC.Hs.Pat.html#hsRecFields"><span class="hs-identifier hs-var hs-var">hsRecFields</span></a></span></span><span> </span><span id="local-6989586621680883310"><span class="annot"><span class="annottext">HsRecFields p arg
</span><a href="#local-6989586621680883310"><span class="hs-identifier hs-var">rbinds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsRecField p arg) -&gt; XCFieldOcc p)
-&gt; [GenLocated SrcSpan (HsRecField p arg)] -&gt; [XCFieldOcc p]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan (XCFieldOcc p) -&gt; XCFieldOcc p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (XCFieldOcc p) -&gt; XCFieldOcc p)
-&gt; (GenLocated SrcSpan (HsRecField p arg)
    -&gt; GenLocated SrcSpan (XCFieldOcc p))
-&gt; GenLocated SrcSpan (HsRecField p arg)
-&gt; XCFieldOcc p
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField p arg -&gt; GenLocated SrcSpan (XCFieldOcc p)
forall pass arg. HsRecField pass arg -&gt; Located (XCFieldOcc pass)
</span><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier hs-var">hsRecFieldSel</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField p arg -&gt; GenLocated SrcSpan (XCFieldOcc p))
-&gt; (GenLocated SrcSpan (HsRecField p arg) -&gt; HsRecField p arg)
-&gt; GenLocated SrcSpan (HsRecField p arg)
-&gt; GenLocated SrcSpan (XCFieldOcc p)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsRecField p arg) -&gt; HsRecField p arg
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecFields p arg -&gt; [GenLocated SrcSpan (HsRecField p arg)]
forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var hs-var">rec_flds</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields p arg
</span><a href="#local-6989586621680883310"><span class="hs-identifier hs-var">rbinds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="hs-comment">-- Probably won't typecheck at once, things have changed :/</span><span>
</span><span id="line-489"></span><span id="local-6989586621680883308"><span id="local-6989586621680883309"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldsArgs"><span class="hs-identifier hs-type">hsRecFieldsArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883309"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883308"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680883308"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-490"></span><span id="hsRecFieldsArgs"><span class="annot"><span class="annottext">hsRecFieldsArgs :: forall p a. HsRecFields p a -&gt; [a]
</span><a href="GHC.Hs.Pat.html#hsRecFieldsArgs"><span class="hs-identifier hs-var hs-var">hsRecFieldsArgs</span></a></span></span><span> </span><span id="local-6989586621680883307"><span class="annot"><span class="annottext">HsRecFields p arg
</span><a href="#local-6989586621680883307"><span class="hs-identifier hs-var">rbinds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsRecField' (FieldOcc p) arg) -&gt; arg)
-&gt; [GenLocated SrcSpan (HsRecField' (FieldOcc p) arg)] -&gt; [arg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField' (FieldOcc p) arg -&gt; arg
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField' (FieldOcc p) arg -&gt; arg)
-&gt; (GenLocated SrcSpan (HsRecField' (FieldOcc p) arg)
    -&gt; HsRecField' (FieldOcc p) arg)
-&gt; GenLocated SrcSpan (HsRecField' (FieldOcc p) arg)
-&gt; arg
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsRecField' (FieldOcc p) arg)
-&gt; HsRecField' (FieldOcc p) arg
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecFields p arg
-&gt; [GenLocated SrcSpan (HsRecField' (FieldOcc p) arg)]
forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var hs-var">rec_flds</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields p arg
</span><a href="#local-6989586621680883307"><span class="hs-identifier hs-var">rbinds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>
</span><span id="line-492"></span><span id="local-6989586621680883864"><span id="local-6989586621680883865"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier hs-type">hsRecFieldSel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883865"><span class="hs-identifier hs-type">pass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883864"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#XCFieldOcc"><span class="hs-identifier hs-type">XCFieldOcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883865"><span class="hs-identifier hs-type">pass</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-493"></span><span id="hsRecFieldSel"><span class="annot"><span class="annottext">hsRecFieldSel :: forall pass arg. HsRecField pass arg -&gt; Located (XCFieldOcc pass)
</span><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier hs-var hs-var">hsRecFieldSel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FieldOcc pass -&gt; XCFieldOcc pass)
-&gt; GenLocated SrcSpan (FieldOcc pass)
-&gt; GenLocated SrcSpan (XCFieldOcc pass)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">FieldOcc pass -&gt; XCFieldOcc pass
forall pass. FieldOcc pass -&gt; XCFieldOcc pass
</span><a href="GHC.Hs.Type.html#extFieldOcc"><span class="hs-identifier hs-var hs-var">extFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (FieldOcc pass)
 -&gt; GenLocated SrcSpan (XCFieldOcc pass))
-&gt; (HsRecField' (FieldOcc pass) arg
    -&gt; GenLocated SrcSpan (FieldOcc pass))
-&gt; HsRecField' (FieldOcc pass) arg
-&gt; GenLocated SrcSpan (XCFieldOcc pass)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc pass) arg
-&gt; GenLocated SrcSpan (FieldOcc pass)
forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span id="local-6989586621680883858"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecFieldId"><span class="hs-identifier hs-type">hsRecFieldId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883858"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span></span><span>
</span><span id="line-496"></span><span id="hsRecFieldId"><span class="annot"><span class="annottext">hsRecFieldId :: forall arg. HsRecField GhcTc arg -&gt; Located TyVar
</span><a href="GHC.Hs.Pat.html#hsRecFieldId"><span class="hs-identifier hs-var hs-var">hsRecFieldId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg -&gt; Located TyVar
forall pass arg. HsRecField pass arg -&gt; Located (XCFieldOcc pass)
</span><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier hs-var">hsRecFieldSel</span></a></span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span id="local-6989586621680883856"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldRdr"><span class="hs-identifier hs-type">hsRecUpdFieldRdr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecUpdField"><span class="hs-identifier hs-type">HsRecUpdField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883856"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span></span><span>
</span><span id="line-499"></span><span id="hsRecUpdFieldRdr"><span class="annot"><span class="annottext">hsRecUpdFieldRdr :: forall (p :: Pass). HsRecUpdField (GhcPass p) -&gt; Located RdrName
</span><a href="GHC.Hs.Pat.html#hsRecUpdFieldRdr"><span class="hs-identifier hs-var hs-var">hsRecUpdFieldRdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AmbiguousFieldOcc (GhcPass p) -&gt; RdrName)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass p))
-&gt; Located RdrName
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc (GhcPass p) -&gt; RdrName
forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -&gt; RdrName
</span><a href="GHC.Hs.Type.html#rdrNameAmbiguousFieldOcc"><span class="hs-identifier hs-var">rdrNameAmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass p))
 -&gt; Located RdrName)
-&gt; (HsRecField'
      (AmbiguousFieldOcc (GhcPass p)) (LHsExpr (GhcPass p))
    -&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass p)))
-&gt; HsRecField'
     (AmbiguousFieldOcc (GhcPass p)) (LHsExpr (GhcPass p))
-&gt; Located RdrName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (AmbiguousFieldOcc (GhcPass p)) (LHsExpr (GhcPass p))
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass p))
forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span id="local-6989586621680883849"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldId"><span class="hs-identifier hs-type">hsRecUpdFieldId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#AmbiguousFieldOcc"><span class="hs-identifier hs-type">AmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621680883849"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span></span><span>
</span><span id="line-502"></span><span id="hsRecUpdFieldId"><span class="annot"><span class="annottext">hsRecUpdFieldId :: forall arg.
HsRecField' (AmbiguousFieldOcc GhcTc) arg -&gt; Located TyVar
</span><a href="GHC.Hs.Pat.html#hsRecUpdFieldId"><span class="hs-identifier hs-var hs-var">hsRecUpdFieldId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FieldOcc GhcTc -&gt; TyVar)
-&gt; GenLocated SrcSpan (FieldOcc GhcTc) -&gt; Located TyVar
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">FieldOcc GhcTc -&gt; TyVar
forall pass. FieldOcc pass -&gt; XCFieldOcc pass
</span><a href="GHC.Hs.Type.html#extFieldOcc"><span class="hs-identifier hs-var hs-var">extFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (FieldOcc GhcTc) -&gt; Located TyVar)
-&gt; (HsRecField' (AmbiguousFieldOcc GhcTc) arg
    -&gt; GenLocated SrcSpan (FieldOcc GhcTc))
-&gt; HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; Located TyVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; GenLocated SrcSpan (FieldOcc GhcTc)
forall arg.
HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; GenLocated SrcSpan (FieldOcc GhcTc)
</span><a href="GHC.Hs.Pat.html#hsRecUpdFieldOcc"><span class="hs-identifier hs-var">hsRecUpdFieldOcc</span></a></span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span id="local-6989586621680883847"><span class="annot"><a href="GHC.Hs.Pat.html#hsRecUpdFieldOcc"><span class="hs-identifier hs-type">hsRecUpdFieldOcc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#AmbiguousFieldOcc"><span class="hs-identifier hs-type">AmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621680883847"><span class="hs-identifier hs-type">arg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LFieldOcc"><span class="hs-identifier hs-type">LFieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span></span><span>
</span><span id="line-505"></span><span id="hsRecUpdFieldOcc"><span class="annot"><span class="annottext">hsRecUpdFieldOcc :: forall arg.
HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; GenLocated SrcSpan (FieldOcc GhcTc)
</span><a href="GHC.Hs.Pat.html#hsRecUpdFieldOcc"><span class="hs-identifier hs-var hs-var">hsRecUpdFieldOcc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AmbiguousFieldOcc GhcTc -&gt; FieldOcc GhcTc)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcTc)
-&gt; GenLocated SrcSpan (FieldOcc GhcTc)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcTc -&gt; FieldOcc GhcTc
</span><a href="GHC.Hs.Type.html#unambiguousFieldOcc"><span class="hs-identifier hs-var">unambiguousFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (AmbiguousFieldOcc GhcTc)
 -&gt; GenLocated SrcSpan (FieldOcc GhcTc))
-&gt; (HsRecField' (AmbiguousFieldOcc GhcTc) arg
    -&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcTc))
-&gt; HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; GenLocated SrcSpan (FieldOcc GhcTc)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (AmbiguousFieldOcc GhcTc) arg
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcTc)
forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span><span>
</span><span id="line-506"></span><span>
</span><span id="line-507"></span><span>
</span><span id="line-508"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
*              Printing patterns
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span id="local-6989586621680883843"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680883295"><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883843"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883843"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-517"></span><span>    </span><span id="local-6989586621680883292"><span class="annot"><span class="annottext">ppr :: Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; SDoc
forall (p :: Pass). OutputableBndrId p =&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span></span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span class="hs-comment">-- | Print with type info if -dppr-debug is on</span><span>
</span><span id="line-520"></span><span id="local-6989586621680883842"><span class="annot"><a href="GHC.Hs.Pat.html#pprPatBndr"><span class="hs-identifier hs-type">pprPatBndr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#OutputableBndr"><span class="hs-identifier hs-type">OutputableBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883842"><span class="hs-identifier hs-type">name</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680883842"><span class="hs-identifier hs-type">name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-521"></span><span id="pprPatBndr"><span class="annot"><span class="annottext">pprPatBndr :: forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPatBndr"><span class="hs-identifier hs-var hs-var">pprPatBndr</span></a></span></span><span> </span><span id="local-6989586621680883285"><span class="annot"><span class="annottext">name
</span><a href="#local-6989586621680883285"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-522"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#getPprDebug"><span class="hs-identifier hs-var">getPprDebug</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-523"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BindingSite -&gt; name -&gt; SDoc
forall a. OutputableBndr a =&gt; BindingSite -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprBndr"><span class="hs-identifier hs-var">pprBndr</span></a></span><span> </span><span class="annot"><span class="annottext">BindingSite
</span><a href="GHC.Utils.Outputable.html#LambdaBind"><span class="hs-identifier hs-var">LambdaBind</span></a></span><span> </span><span class="annot"><span class="annottext">name
</span><a href="#local-6989586621680883285"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Could pass the site to pprPat</span><span>
</span><span id="line-524"></span><span>                                              </span><span class="hs-comment">-- but is it worth it?</span><span>
</span><span id="line-525"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">name -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixOcc"><span class="hs-identifier hs-var">pprPrefixOcc</span></a></span><span> </span><span class="annot"><span class="annottext">name
</span><a href="#local-6989586621680883285"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-526"></span><span>
</span><span id="line-527"></span><span id="local-6989586621680883834"><span class="annot"><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-type">pprParendLPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883834"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>              </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883834"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-529"></span><span id="pprParendLPat"><span class="annot"><span class="annottext">pprParendLPat :: forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var hs-var">pprParendLPat</span></a></span></span><span> </span><span id="local-6989586621680883274"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680883274"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Pat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendPat"><span class="hs-identifier hs-var">pprParendPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680883274"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass p) -&gt; SDoc)
-&gt; (GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p))
-&gt; GenLocated SrcSpan (Pat (GhcPass p))
-&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprParendPat"><span class="hs-identifier hs-type">pprParendPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680883831"><span class="annot"><a href="#local-6989586621680883831"><span class="hs-identifier hs-type">p</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883831"><span class="hs-identifier hs-type">p</span></a></span><span>
</span><span id="line-532"></span><span>             </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span>
</span><span id="line-533"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883831"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-534"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-535"></span><span id="pprParendPat"><span class="annot"><span class="annottext">pprParendPat :: forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendPat"><span class="hs-identifier hs-var hs-var">pprParendPat</span></a></span></span><span> </span><span id="local-6989586621680883262"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680883262"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680883261"><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883261"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a. (SDocContext -&gt; a) -&gt; (a -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sdocOption"><span class="hs-identifier hs-var">sdocOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocPrintTypecheckerElaboration"><span class="hs-identifier hs-var hs-var">sdocPrintTypecheckerElaboration</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680883258"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883258"><span class="hs-identifier hs-var">print_tc_elab</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-536"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680883257"><span class="hs-identifier hs-var">need_parens</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883258"><span class="hs-identifier hs-var">print_tc_elab</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883261"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-537"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; SDoc
forall (p :: Pass). OutputableBndrId p =&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883261"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-538"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; SDoc
forall (p :: Pass). OutputableBndrId p =&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883261"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-539"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-540"></span><span>    </span><span id="local-6989586621680883257"><span class="annot"><span class="annottext">need_parens :: Bool -&gt; Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680883257"><span class="hs-identifier hs-var hs-var">need_parens</span></a></span></span><span> </span><span id="local-6989586621680883256"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883256"><span class="hs-identifier hs-var">print_tc_elab</span></a></span></span><span> </span><span id="local-6989586621680883255"><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883255"><span class="hs-identifier hs-var">pat</span></a></span></span><span>
</span><span id="line-541"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883831"><span class="hs-identifier hs-type">p</span></a></span><span>
</span><span id="line-542"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-type">XPat</span></a></span><span> </span><span id="local-6989586621680883251"><span class="annot"><span class="annottext">XXPat GhcTc
</span><a href="#local-6989586621680883251"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883255"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-543"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">XXPat GhcTc
</span><a href="#local-6989586621680883251"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-544"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883256"><span class="hs-identifier hs-var">print_tc_elab</span></a></span><span>
</span><span id="line-545"></span><span>
</span><span id="line-546"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-547"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Pat (GhcPass p) -&gt; Bool
forall (p :: Pass). IsPass p =&gt; PprPrec -&gt; Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#patNeedsParens"><span class="hs-identifier hs-var">patNeedsParens</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680883262"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680883255"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-548"></span><span>      </span><span class="hs-comment">-- For a CoPat we need parens if we are going to show it, which</span><span>
</span><span id="line-549"></span><span>      </span><span class="hs-comment">-- we do if -fprint-typechecker-elaboration is on (c.f. pprHsWrapper)</span><span>
</span><span id="line-550"></span><span>      </span><span class="hs-comment">-- But otherwise the CoPat is discarded, so it</span><span>
</span><span id="line-551"></span><span>      </span><span class="hs-comment">-- is the pattern inside that matters.  Sigh.</span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-type">pprPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680883250"><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-554"></span><span id="pprPat"><span class="annot"><span class="annottext">pprPat :: forall (p :: Pass). OutputableBndrId p =&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var hs-var">pprPat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span class="annot"><span class="annottext">XVarPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883196"><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883196"><span class="hs-identifier hs-var">lvar</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdGhcP p -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPatBndr"><span class="hs-identifier hs-var">pprPatBndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (IdGhcP p) -&gt; IdGhcP p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdGhcP p)
Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883196"><span class="hs-identifier hs-var">lvar</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-555"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-type">WildPat</span></a></span><span> </span><span class="annot"><span class="annottext">XWildPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span>
</span><span id="line-556"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883194"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883194"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'~'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883194"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-557"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="annot"><span class="annottext">XBangPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883191"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883191"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'!'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883191"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-558"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span class="annot"><span class="annottext">XAsPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883190"><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883190"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680883189"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883189"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">IdGhcP p -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixOcc"><span class="hs-identifier hs-var">pprPrefixOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (IdGhcP p) -&gt; IdGhcP p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdGhcP p)
Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883190"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'@'</span></span><span class="hs-special">,</span><span>
</span><span id="line-559"></span><span>                                        </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883189"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-560"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-type">ViewPat</span></a></span><span> </span><span class="annot"><span class="annottext">XViewPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883187"><span class="annot"><span class="annottext">LHsExpr (GhcPass p)
</span><a href="#local-6989586621680883187"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680883186"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883186"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsExpr (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
LHsExpr (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Expr.html#pprLExpr"><span class="hs-identifier hs-var">pprLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr (GhcPass p)
</span><a href="#local-6989586621680883187"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; -&gt; &quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883186"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-561"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883184"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883184"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883184"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-562"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-type">LitPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLitPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883183"><span class="annot"><span class="annottext">HsLit (GhcPass p)
</span><a href="#local-6989586621680883183"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsLit (GhcPass p) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit (GhcPass p)
</span><a href="#local-6989586621680883183"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-563"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-type">NPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883182"><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883182"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr (GhcPass p))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883182"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-564"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-type">NPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883181"><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883181"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883181"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-565"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-type">NPlusKPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPlusKPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883180"><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883180"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680883179"><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883179"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Located (IdGhcP p) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdGhcP p)
Located (IdP (GhcPass p))
</span><a href="#local-6989586621680883180"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680883179"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-566"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-type">SplicePat</span></a></span><span> </span><span class="annot"><span class="annottext">XSplicePat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883178"><span class="annot"><span class="annottext">HsSplice (GhcPass p)
</span><a href="#local-6989586621680883178"><span class="hs-identifier hs-var">splice</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsSplice (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
HsSplice (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Expr.html#pprSplice"><span class="hs-identifier hs-var">pprSplice</span></a></span><span> </span><span class="annot"><span class="annottext">HsSplice (GhcPass p)
</span><a href="#local-6989586621680883178"><span class="hs-identifier hs-var">splice</span></a></span><span>
</span><span id="line-567"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSigPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883177"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883177"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621680883176"><span class="annot"><span class="annottext">HsPatSigType (NoGhcTc (GhcPass p))
</span><a href="#local-6989586621680883176"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883177"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680883173"><span class="hs-identifier hs-var">ppr_ty</span></a></span><span>
</span><span id="line-568"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680883173"><span class="annot"><span class="annottext">ppr_ty :: SDoc
</span><a href="#local-6989586621680883173"><span class="hs-identifier hs-var hs-var">ppr_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-569"></span><span>                   </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-var">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Parsed) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Parsed)
HsPatSigType (NoGhcTc (GhcPass p))
</span><a href="#local-6989586621680883176"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-570"></span><span>                   </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-var">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed)
HsPatSigType (NoGhcTc (GhcPass p))
</span><a href="#local-6989586621680883176"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-571"></span><span>                   </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed)
HsPatSigType (NoGhcTc (GhcPass p))
</span><a href="#local-6989586621680883176"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-572"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-type">ListPat</span></a></span><span> </span><span class="annot"><span class="annottext">XListPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883135"><span class="annot"><span class="annottext">[LPat (GhcPass p)]
</span><a href="#local-6989586621680883135"><span class="hs-identifier hs-var">pats</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#brackets"><span class="hs-identifier hs-var">brackets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Located (Pat (GhcPass p))] -&gt; SDoc
forall a. Outputable a =&gt; [a] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#interpp%27SP"><span class="hs-identifier hs-var">interpp'SP</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass p))]
[LPat (GhcPass p)]
</span><a href="#local-6989586621680883135"><span class="hs-identifier hs-var">pats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-type">TuplePat</span></a></span><span> </span><span class="annot"><span class="annottext">XTuplePat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883132"><span class="annot"><span class="annottext">[LPat (GhcPass p)]
</span><a href="#local-6989586621680883132"><span class="hs-identifier hs-var">pats</span></a></span></span><span> </span><span id="local-6989586621680883131"><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680883131"><span class="hs-identifier hs-var">bx</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-574"></span><span>    </span><span class="hs-comment">-- Special-case unary boxed tuples so that they are pretty-printed as</span><span>
</span><span id="line-575"></span><span>    </span><span class="hs-comment">-- `Solo x`, not `(x)`</span><span>
</span><span id="line-576"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">[</span><span id="local-6989586621680883130"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883130"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LPat (GhcPass p)]
</span><a href="#local-6989586621680883132"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-577"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680883131"><span class="hs-identifier hs-var">bx</span></a></span><span>
</span><span id="line-578"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; String
</span><a href="GHC.Builtin.Types.html#mkTupleStr"><span class="hs-identifier hs-var">mkTupleStr</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883130"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-579"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-580"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TupleSort -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Types.Basic.html#tupleParens"><span class="hs-identifier hs-var">tupleParens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Boxity -&gt; TupleSort
</span><a href="GHC.Types.Basic.html#boxityTupleSort"><span class="hs-identifier hs-var">boxityTupleSort</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680883131"><span class="hs-identifier hs-var">bx</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Located (Pat (GhcPass p)) -&gt; SDoc)
-&gt; [Located (Pat (GhcPass p))] -&gt; SDoc
forall a. (a -&gt; SDoc) -&gt; [a] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprWithCommas"><span class="hs-identifier hs-var">pprWithCommas</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass p))]
[LPat (GhcPass p)]
</span><a href="#local-6989586621680883132"><span class="hs-identifier hs-var">pats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-type">SumPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSumPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680883124"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883124"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621680883123"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680883123"><span class="hs-identifier hs-var">alt</span></a></span></span><span> </span><span id="local-6989586621680883122"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680883122"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Types.Basic.html#sumParens"><span class="hs-identifier hs-var">sumParens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Located (Pat (GhcPass p)) -&gt; SDoc)
-&gt; Located (Pat (GhcPass p)) -&gt; Int -&gt; Int -&gt; SDoc
forall a. (a -&gt; SDoc) -&gt; a -&gt; Int -&gt; Int -&gt; SDoc
</span><a href="GHC.Types.Basic.html#pprAlternative"><span class="hs-identifier hs-var">pprAlternative</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883124"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680883123"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680883122"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con :: forall p. Pat p -&gt; Located (ConLikeP p)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883119"><span class="annot"><span class="annottext">Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680883119"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-583"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: forall p. Pat p -&gt; HsConPatDetails p
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883118"><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680883118"><span class="hs-identifier hs-var">details</span></a></span></span><span>
</span><span id="line-584"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: forall p. Pat p -&gt; XConPat p
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883117"><span class="annot"><span class="annottext">XConPat (GhcPass p)
</span><a href="#local-6989586621680883117"><span class="hs-identifier hs-var">ext</span></a></span></span><span>
</span><span id="line-585"></span><span>               </span><span class="hs-special">}</span><span>
</span><span id="line-586"></span><span>       </span><span class="hs-special">)</span><span>
</span><span id="line-587"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-588"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-var">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
forall con (p :: Pass).
(OutputableBndr con, OutputableBndrId p) =&gt;
con -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-var">pprUserCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680883119"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680883118"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-589"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-var">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
forall con (p :: Pass).
(OutputableBndr con, OutputableBndrId p) =&gt;
con -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-var">pprUserCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680883119"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680883118"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-590"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a. (SDocContext -&gt; a) -&gt; (a -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sdocOption"><span class="hs-identifier hs-var">sdocOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocPrintTypecheckerElaboration"><span class="hs-identifier hs-var hs-var">sdocPrintTypecheckerElaboration</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-591"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
forall con (p :: Pass).
(OutputableBndr con, OutputableBndrId p) =&gt;
con -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-var">pprUserCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located ConLike -&gt; ConLike
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located ConLike
Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680883119"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680883118"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-592"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-593"></span><span>          </span><span class="hs-comment">-- Tiresome; in 'GHC.Tc.Gen.Bind.tcRhs' we print out a typechecked Pat in an</span><span>
</span><span id="line-594"></span><span>          </span><span class="hs-comment">-- error message, and we want to make sure it prints nicely</span><span>
</span><span id="line-595"></span><span>          </span><span class="annot"><span class="annottext">Located ConLike -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located ConLike
Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680883119"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-596"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(TyVar -&gt; SDoc) -&gt; [TyVar] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPatBndr"><span class="hs-identifier hs-var">pprPatBndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680883067"><span class="hs-identifier hs-var">tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680883066"><span class="hs-identifier hs-var">dicts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TcEvBinds -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">TcEvBinds
</span><a href="#local-6989586621680883065"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-598"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-var">pprConArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680883118"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-599"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-type">ConPatTc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cpt_tvs :: ConPatTc -&gt; [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_tvs"><span class="hs-identifier hs-var">cpt_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883067"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680883067"><span class="hs-identifier hs-var">tvs</span></a></span></span><span>
</span><span id="line-600"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_dicts :: ConPatTc -&gt; [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_dicts"><span class="hs-identifier hs-var">cpt_dicts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883066"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680883066"><span class="hs-identifier hs-var">dicts</span></a></span></span><span>
</span><span id="line-601"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_binds :: ConPatTc -&gt; TcEvBinds
</span><a href="GHC.Hs.Pat.html#cpt_binds"><span class="hs-identifier hs-var">cpt_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883065"><span class="annot"><span class="annottext">TcEvBinds
</span><a href="#local-6989586621680883065"><span class="hs-identifier hs-var">binds</span></a></span></span><span>
</span><span id="line-602"></span><span>                       </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XConPat (GhcPass p)
ConPatTc
</span><a href="#local-6989586621680883117"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-603"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-type">XPat</span></a></span><span> </span><span id="local-6989586621680883064"><span class="annot"><span class="annottext">XXPat (GhcPass p)
</span><a href="#local-6989586621680883064"><span class="hs-identifier hs-var">ext</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883250"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &lt; 811
</span><span>  </span><span class="hs-identifier">GhcPs</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">noExtCon</span><span> </span><span class="hs-identifier">ext</span><span>
</span><span id="line-606"></span><span>  </span><span class="hs-identifier">GhcRn</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">noExtCon</span><span> </span><span class="hs-identifier">ext</span><span class="hs-cpp">
#endif
</span><span>  </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; (Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Tc.Types.Evidence.html#pprHsWrapper"><span class="hs-identifier hs-var">pprHsWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621680883052"><span class="hs-identifier hs-var">co</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680883051"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883051"><span class="hs-identifier hs-var">parens</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-609"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680883051"><span class="hs-identifier hs-var">parens</span></a></span><span>
</span><span id="line-610"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Pat GhcTc -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendPat"><span class="hs-identifier hs-var">pprParendPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680883050"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-611"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; SDoc
forall (p :: Pass). OutputableBndrId p =&gt; Pat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprPat"><span class="hs-identifier hs-var">pprPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680883050"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-612"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span> </span><span id="local-6989586621680883052"><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621680883052"><span class="hs-identifier hs-var">co</span></a></span></span><span> </span><span id="local-6989586621680883050"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680883050"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XXPat (GhcPass p)
CoPat
</span><a href="#local-6989586621680883064"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-613"></span><span>
</span><span id="line-614"></span><span id="local-6989586621680883780"><span id="local-6989586621680883781"><span class="annot"><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-type">pprUserCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#OutputableBndr"><span class="hs-identifier hs-type">OutputableBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883781"><span class="hs-identifier hs-type">con</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883780"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-615"></span><span>           </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680883781"><span class="hs-identifier hs-type">con</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-type">HsConPatDetails</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883780"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span></span><span>
</span><span id="line-616"></span><span id="pprUserCon"><span class="annot"><span class="annottext">pprUserCon :: forall con (p :: Pass).
(OutputableBndr con, OutputableBndrId p) =&gt;
con -&gt; HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-var hs-var">pprUserCon</span></a></span></span><span> </span><span id="local-6989586621680883036"><span class="annot"><span class="annottext">con
</span><a href="#local-6989586621680883036"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621680883035"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883035"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621680883034"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883034"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883035"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">con -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprInfixOcc"><span class="hs-identifier hs-var">pprInfixOcc</span></a></span><span> </span><span class="annot"><span class="annottext">con
</span><a href="#local-6989586621680883036"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p)) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass p))
LPat (GhcPass p)
</span><a href="#local-6989586621680883034"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-617"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprUserCon"><span class="hs-identifier hs-var">pprUserCon</span></a></span><span> </span><span id="local-6989586621680883032"><span class="annot"><span class="annottext">con
</span><a href="#local-6989586621680883032"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621680883031"><span class="annot"><span class="annottext">HsConDetails
  (LPat (GhcPass p)) (HsRecFields (GhcPass p) (LPat (GhcPass p)))
</span><a href="#local-6989586621680883031"><span class="hs-identifier hs-var">details</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">con -&gt; SDoc
forall name. OutputableBndr name =&gt; name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixOcc"><span class="hs-identifier hs-var">pprPrefixOcc</span></a></span><span> </span><span class="annot"><span class="annottext">con
</span><a href="#local-6989586621680883032"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsConDetails
  (LPat (GhcPass p)) (HsRecFields (GhcPass p) (LPat (GhcPass p)))
-&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-var">pprConArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HsConDetails
  (LPat (GhcPass p)) (HsRecFields (GhcPass p) (LPat (GhcPass p)))
</span><a href="#local-6989586621680883031"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-618"></span><span>
</span><span id="line-619"></span><span id="local-6989586621680883777"><span class="annot"><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-type">pprConArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883777"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-620"></span><span>           </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-type">HsConPatDetails</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883777"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-621"></span><span id="pprConArgs"><span class="annot"><span class="annottext">pprConArgs :: forall (p :: Pass).
OutputableBndrId p =&gt;
HsConPatDetails (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-var hs-var">pprConArgs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-type">PrefixCon</span></a></span><span> </span><span id="local-6989586621680883018"><span class="annot"><span class="annottext">[LPat (GhcPass p)]
</span><a href="#local-6989586621680883018"><span class="hs-identifier hs-var">pats</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Located (Pat (GhcPass p)) -&gt; SDoc)
-&gt; [Located (Pat (GhcPass p))] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass p))]
[LPat (GhcPass p)]
</span><a href="#local-6989586621680883018"><span class="hs-identifier hs-var">pats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-622"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-var">pprConArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621680883016"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883016"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621680883015"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883015"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883016"><span class="hs-identifier hs-var">p1</span></a></span><span>
</span><span id="line-623"></span><span>                                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
forall (p :: Pass).
OutputableBndrId p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; SDoc
</span><a href="GHC.Hs.Pat.html#pprParendLPat"><span class="hs-identifier hs-var">pprParendLPat</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680883015"><span class="hs-identifier hs-var">p2</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-624"></span><span class="annot"><a href="GHC.Hs.Pat.html#pprConArgs"><span class="hs-identifier hs-var">pprConArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span id="local-6989586621680883014"><span class="annot"><span class="annottext">HsRecFields (GhcPass p) (LPat (GhcPass p))
</span><a href="#local-6989586621680883014"><span class="hs-identifier hs-var">rpats</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsRecFields (GhcPass p) (Located (Pat (GhcPass p))) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields (GhcPass p) (Located (Pat (GhcPass p)))
HsRecFields (GhcPass p) (LPat (GhcPass p))
</span><a href="#local-6989586621680883014"><span class="hs-identifier hs-var">rpats</span></a></span><span>
</span><span id="line-625"></span><span>
</span><span id="line-626"></span><span id="local-6989586621680883772"><span id="local-6989586621680883773"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680883011"><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883773"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-627"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883772"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883773"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-628"></span><span>  </span><span id="local-6989586621680883002"><span class="annot"><span class="annottext">ppr :: HsRecFields p arg -&gt; SDoc
</span><a href="#local-6989586621680883002"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rec_flds :: forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var">rec_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680883001"><span class="annot"><span class="annottext">[LHsRecField p arg]
</span><a href="#local-6989586621680883001"><span class="hs-identifier hs-var">flds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rec_dotdot :: forall p arg. HsRecFields p arg -&gt; Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var">rec_dotdot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-629"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LHsRecField p arg -&gt; SDoc) -&gt; [LHsRecField p arg] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecField p arg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField p arg]
</span><a href="#local-6989586621680883001"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-630"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rec_flds :: forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var">rec_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882998"><span class="annot"><span class="annottext">[LHsRecField p arg]
</span><a href="#local-6989586621680882998"><span class="hs-identifier hs-var">flds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rec_dotdot :: forall p arg. HsRecFields p arg -&gt; Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var">rec_dotdot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located Int -&gt; Int
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span id="local-6989586621680882997"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680882997"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-631"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LHsRecField p arg -&gt; SDoc) -&gt; [LHsRecField p arg] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecField p arg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [LHsRecField p arg] -&gt; [LHsRecField p arg]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680882997"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField p arg]
</span><a href="#local-6989586621680882998"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680882995"><span class="hs-identifier hs-var">dotdot</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-632"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-633"></span><span>          </span><span id="local-6989586621680882995"><span class="annot"><span class="annottext">dotdot :: SDoc
</span><a href="#local-6989586621680882995"><span class="hs-identifier hs-var hs-var">dotdot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;..&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#whenPprDebug"><span class="hs-identifier hs-var">whenPprDebug</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField p arg] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [LHsRecField p arg] -&gt; [LHsRecField p arg]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680882997"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField p arg]
</span><a href="#local-6989586621680882998"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span id="local-6989586621680883768"><span id="local-6989586621680883769"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680882990"><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883769"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883768"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-636"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField%27"><span class="hs-identifier hs-type">HsRecField'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883769"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883768"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-637"></span><span>  </span><span id="local-6989586621680882986"><span class="annot"><span class="annottext">ppr :: HsRecField' p arg -&gt; SDoc
</span><a href="#local-6989586621680882986"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882985"><span class="annot"><span class="annottext">Located p
</span><a href="#local-6989586621680882985"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882984"><span class="annot"><span class="annottext">arg
</span><a href="#local-6989586621680882984"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-638"></span><span>                    </span><span class="annot"><span class="annottext">hsRecPun :: forall id arg. HsRecField' id arg -&gt; Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882983"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680882983"><span class="hs-identifier hs-var">pun</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-639"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located p -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located p
</span><a href="#local-6989586621680882985"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnless"><span class="hs-identifier hs-var">ppUnless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680882983"><span class="hs-identifier hs-var">pun</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#equals"><span class="hs-identifier hs-var">equals</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">arg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">arg
</span><a href="#local-6989586621680882984"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-640"></span><span>
</span><span id="line-641"></span><span>
</span><span id="line-642"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
*              Building patterns
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-649"></span><span>
</span><span id="line-650"></span><span class="annot"><a href="GHC.Hs.Pat.html#mkPrefixConPat"><span class="hs-identifier hs-type">mkPrefixConPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-651"></span><span>                  </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span>
</span><span id="line-652"></span><span class="hs-comment">-- Make a vanilla Prefix constructor pattern</span><span>
</span><span id="line-653"></span><span id="mkPrefixConPat"><span class="annot"><span class="annottext">mkPrefixConPat :: DataCon -&gt; [LPat GhcTc] -&gt; [Type] -&gt; LPat GhcTc
</span><a href="GHC.Hs.Pat.html#mkPrefixConPat"><span class="hs-identifier hs-var hs-var">mkPrefixConPat</span></a></span></span><span> </span><span id="local-6989586621680882980"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680882980"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621680882979"><span class="annot"><span class="annottext">[LPat GhcTc]
</span><a href="#local-6989586621680882979"><span class="hs-identifier hs-var">pats</span></a></span></span><span> </span><span id="local-6989586621680882978"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680882978"><span class="hs-identifier hs-var">tys</span></a></span></span><span>
</span><span id="line-654"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Located (Pat GhcTc)
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Located (Pat GhcTc))
-&gt; Pat GhcTc -&gt; Located (Pat GhcTc)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcTc)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; Located ConLike
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; ConLike
</span><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-var">RealDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680882980"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-655"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConPatDetails GhcTc
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
-&gt; HsConDetails
     (Located (Pat GhcTc)) (HsRecFields GhcTc (Located (Pat GhcTc)))
forall arg rec. [arg] -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-var">PrefixCon</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
[LPat GhcTc]
</span><a href="#local-6989586621680882979"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-656"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcTc
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConPatTc :: [Type] -&gt; [TyVar] -&gt; [TyVar] -&gt; TcEvBinds -&gt; HsWrapper -&gt; ConPatTc
</span><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-type">ConPatTc</span></a></span><span>
</span><span id="line-657"></span><span>                     </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cpt_tvs :: [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_tvs"><span class="hs-identifier hs-var">cpt_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-658"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_dicts :: [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_dicts"><span class="hs-identifier hs-var">cpt_dicts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-659"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_binds :: TcEvBinds
</span><a href="GHC.Hs.Pat.html#cpt_binds"><span class="hs-identifier hs-var">cpt_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TcEvBinds
</span><a href="GHC.Tc.Types.Evidence.html#emptyTcEvBinds"><span class="hs-identifier hs-var">emptyTcEvBinds</span></a></span><span>
</span><span id="line-660"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_arg_tys :: [Type]
</span><a href="GHC.Hs.Pat.html#cpt_arg_tys"><span class="hs-identifier hs-var">cpt_arg_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680882978"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-661"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_wrap :: HsWrapper
</span><a href="GHC.Hs.Pat.html#cpt_wrap"><span class="hs-identifier hs-var">cpt_wrap</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#idHsWrapper"><span class="hs-identifier hs-var">idHsWrapper</span></a></span><span>
</span><span id="line-662"></span><span>                     </span><span class="hs-special">}</span><span>
</span><span id="line-663"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-664"></span><span>
</span><span id="line-665"></span><span class="annot"><a href="GHC.Hs.Pat.html#mkNilPat"><span class="hs-identifier hs-type">mkNilPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span>
</span><span id="line-666"></span><span id="mkNilPat"><span class="annot"><span class="annottext">mkNilPat :: Type -&gt; LPat GhcTc
</span><a href="GHC.Hs.Pat.html#mkNilPat"><span class="hs-identifier hs-var hs-var">mkNilPat</span></a></span></span><span> </span><span id="local-6989586621680882973"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680882973"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [LPat GhcTc] -&gt; [Type] -&gt; LPat GhcTc
</span><a href="GHC.Hs.Pat.html#mkPrefixConPat"><span class="hs-identifier hs-var">mkPrefixConPat</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#nilDataCon"><span class="hs-identifier hs-var">nilDataCon</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680882973"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-667"></span><span>
</span><span id="line-668"></span><span class="annot"><a href="GHC.Hs.Pat.html#mkCharLitPat"><span class="hs-identifier hs-type">mkCharLitPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#SourceText"><span class="hs-identifier hs-type">SourceText</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span>
</span><span id="line-669"></span><span id="mkCharLitPat"><span class="annot"><span class="annottext">mkCharLitPat :: SourceText -&gt; Char -&gt; LPat GhcTc
</span><a href="GHC.Hs.Pat.html#mkCharLitPat"><span class="hs-identifier hs-var hs-var">mkCharLitPat</span></a></span></span><span> </span><span id="local-6989586621680882971"><span class="annot"><span class="annottext">SourceText
</span><a href="#local-6989586621680882971"><span class="hs-identifier hs-var">src</span></a></span></span><span> </span><span id="local-6989586621680882970"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680882970"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [LPat GhcTc] -&gt; [Type] -&gt; LPat GhcTc
</span><a href="GHC.Hs.Pat.html#mkPrefixConPat"><span class="hs-identifier hs-var">mkPrefixConPat</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#charDataCon"><span class="hs-identifier hs-var">charDataCon</span></a></span><span>
</span><span id="line-670"></span><span>                          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Located (Pat GhcTc)
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Located (Pat GhcTc))
-&gt; Pat GhcTc -&gt; Located (Pat GhcTc)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XLitPat GhcTc -&gt; HsLit GhcTc -&gt; Pat GhcTc
forall p. XLitPat p -&gt; HsLit p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-var">LitPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XLitPat GhcTc
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XHsCharPrim GhcTc -&gt; Char -&gt; HsLit GhcTc
forall x. XHsCharPrim x -&gt; Char -&gt; HsLit x
</span><a href="GHC.Hs.Lit.html#HsCharPrim"><span class="hs-identifier hs-var">HsCharPrim</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
XHsCharPrim GhcTc
</span><a href="#local-6989586621680882971"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680882970"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
* Predicates for checking things about pattern-lists in EquationInfo   *
*                                                                      *
************************************************************************

\subsection[Pat-list-predicates]{Look for interesting things in patterns}

Unlike in the Wadler chapter, where patterns are either ``variables''
or ``constructors,'' here we distinguish between:
\begin{description}
\item[unfailable:]
Patterns that cannot fail to match: variables, wildcards, and lazy
patterns.

These are the irrefutable patterns; the two other categories
are refutable patterns.

\item[constructor:]
A non-literal constructor pattern (see next category).

\item[literal patterns:]
At least the numeric ones may be overloaded.
\end{description}

A pattern is in {\em exactly one} of the above three categories; `as'
patterns are treated specially, of course.

The 1.3 report defines what ``irrefutable'' and ``failure-free'' patterns are.
-}</span><span>
</span><span id="line-703"></span><span>
</span><span id="line-704"></span><span id="local-6989586621680883758"><span class="annot"><a href="GHC.Hs.Pat.html#isBangedLPat"><span class="hs-identifier hs-type">isBangedLPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883758"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-705"></span><span id="isBangedLPat"><span class="annot"><span class="annottext">isBangedLPat :: forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isBangedLPat"><span class="hs-identifier hs-var hs-var">isBangedLPat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
forall (p :: Pass). Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isBangedPat"><span class="hs-identifier hs-var">isBangedPat</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass p) -&gt; Bool)
-&gt; (GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p))
-&gt; GenLocated SrcSpan (Pat (GhcPass p))
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span>
</span><span id="line-706"></span><span>
</span><span id="line-707"></span><span id="local-6989586621680883756"><span class="annot"><a href="GHC.Hs.Pat.html#isBangedPat"><span class="hs-identifier hs-type">isBangedPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883756"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-708"></span><span id="isBangedPat"><span class="annot"><span class="annottext">isBangedPat :: forall (p :: Pass). Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isBangedPat"><span class="hs-identifier hs-var hs-var">isBangedPat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882965"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882965"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isBangedLPat"><span class="hs-identifier hs-var">isBangedLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882965"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-709"></span><span class="annot"><a href="GHC.Hs.Pat.html#isBangedPat"><span class="hs-identifier hs-var">isBangedPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-710"></span><span class="annot"><a href="GHC.Hs.Pat.html#isBangedPat"><span class="hs-identifier hs-var">isBangedPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-711"></span><span>
</span><span id="line-712"></span><span id="local-6989586621680883754"><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-type">looksLazyPatBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsBind"><span class="hs-identifier hs-type">HsBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883754"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-713"></span><span class="hs-comment">-- Returns True of anything *except*</span><span>
</span><span id="line-714"></span><span class="hs-comment">--     a StrictHsBind (as above) or</span><span>
</span><span id="line-715"></span><span class="hs-comment">--     a VarPat</span><span>
</span><span id="line-716"></span><span class="hs-comment">-- In particular, returns True of a pattern binding with a compound pattern, like (I# x)</span><span>
</span><span id="line-717"></span><span class="hs-comment">-- Looks through AbsBinds</span><span>
</span><span id="line-718"></span><span id="looksLazyPatBind"><span class="annot"><span class="annottext">looksLazyPatBind :: forall (p :: Pass). HsBind (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-var hs-var">looksLazyPatBind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#PatBind"><span class="hs-identifier hs-type">PatBind</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_lhs :: forall idL idR. HsBindLR idL idR -&gt; LPat idL
</span><a href="GHC.Hs.Binds.html#pat_lhs"><span class="hs-identifier hs-var">pat_lhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882962"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882962"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-719"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyLPat"><span class="hs-identifier hs-var">looksLazyLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882962"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-720"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-var">looksLazyPatBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#AbsBinds"><span class="hs-identifier hs-type">AbsBinds</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">abs_binds :: forall idL idR. HsBindLR idL idR -&gt; LHsBinds idL
</span><a href="GHC.Hs.Binds.html#abs_binds"><span class="hs-identifier hs-var">abs_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882958"><span class="annot"><span class="annottext">LHsBinds (GhcPass p)
</span><a href="#local-6989586621680882958"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-721"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsBindLR (GhcPass p) (GhcPass p)) -&gt; Bool)
-&gt; LHsBinds (GhcPass p) -&gt; Bool
forall a. (a -&gt; Bool) -&gt; Bag a -&gt; Bool
</span><a href="GHC.Data.Bag.html#anyBag"><span class="hs-identifier hs-var">anyBag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBindLR (GhcPass p) (GhcPass p) -&gt; Bool
forall (p :: Pass). HsBind (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-var">looksLazyPatBind</span></a></span><span> </span><span class="annot"><span class="annottext">(HsBindLR (GhcPass p) (GhcPass p) -&gt; Bool)
-&gt; (GenLocated SrcSpan (HsBindLR (GhcPass p) (GhcPass p))
    -&gt; HsBindLR (GhcPass p) (GhcPass p))
-&gt; GenLocated SrcSpan (HsBindLR (GhcPass p) (GhcPass p))
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsBindLR (GhcPass p) (GhcPass p))
-&gt; HsBindLR (GhcPass p) (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsBinds (GhcPass p)
</span><a href="#local-6989586621680882958"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-722"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-var">looksLazyPatBind</span></a></span><span> </span><span class="annot"><span class="annottext">HsBindLR (GhcPass p) (GhcPass p)
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-723"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span id="local-6989586621680882956"><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyLPat"><span class="hs-identifier hs-type">looksLazyLPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680882956"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-726"></span><span id="looksLazyLPat"><span class="annot"><span class="annottext">looksLazyLPat :: forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyLPat"><span class="hs-identifier hs-var hs-var">looksLazyLPat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
forall (p :: Pass). Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass p) -&gt; Bool)
-&gt; (GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p))
-&gt; GenLocated SrcSpan (Pat (GhcPass p))
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span>
</span><span id="line-727"></span><span>
</span><span id="line-728"></span><span id="local-6989586621680882954"><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-type">looksLazyPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680882954"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-729"></span><span id="looksLazyPat"><span class="annot"><span class="annottext">looksLazyPat :: forall (p :: Pass). Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var hs-var">looksLazyPat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882953"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882953"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyLPat"><span class="hs-identifier hs-var">looksLazyLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882953"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-730"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span class="annot"><span class="annottext">XAsPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882952"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882952"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
forall (p :: Pass). LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyLPat"><span class="hs-identifier hs-var">looksLazyLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882952"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-731"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-732"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-733"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-type">WildPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-734"></span><span class="annot"><a href="GHC.Hs.Pat.html#looksLazyPat"><span class="hs-identifier hs-var">looksLazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="annot"><a href="GHC.Hs.Pat.html#isIrrefutableHsPat"><span class="hs-identifier hs-type">isIrrefutableHsPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680883741"><span class="annot"><a href="#local-6989586621680883741"><span class="hs-identifier hs-type">p</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883741"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-737"></span><span>                   </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883741"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-738"></span><span class="hs-comment">-- (isIrrefutableHsPat p) is true if matching against p cannot fail,</span><span>
</span><span id="line-739"></span><span class="hs-comment">-- in the sense of falling through to the next pattern.</span><span>
</span><span id="line-740"></span><span class="hs-comment">--      (NB: this is not quite the same as the (silly) defn</span><span>
</span><span id="line-741"></span><span class="hs-comment">--      in 3.17.2 of the Haskell 98 report.)</span><span>
</span><span id="line-742"></span><span class="hs-comment">--</span><span>
</span><span id="line-743"></span><span class="hs-comment">-- WARNING: isIrrefutableHsPat returns False if it's in doubt.</span><span>
</span><span id="line-744"></span><span class="hs-comment">-- Specifically on a ConPatIn, which is what it sees for a</span><span>
</span><span id="line-745"></span><span class="hs-comment">-- (LPat Name) in the renamer, it doesn't know the size of the</span><span>
</span><span id="line-746"></span><span class="hs-comment">-- constructor family, so it returns False.  Result: only</span><span>
</span><span id="line-747"></span><span class="hs-comment">-- tuple patterns are considered irrefutable at the renamer stage.</span><span>
</span><span id="line-748"></span><span class="hs-comment">--</span><span>
</span><span id="line-749"></span><span class="hs-comment">-- But if it returns True, the pattern is definitely irrefutable</span><span>
</span><span id="line-750"></span><span id="isIrrefutableHsPat"><span class="annot"><span class="annottext">isIrrefutableHsPat :: forall (p :: Pass).
OutputableBndrId p =&gt;
DynFlags -&gt; LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isIrrefutableHsPat"><span class="hs-identifier hs-var hs-var">isIrrefutableHsPat</span></a></span></span><span> </span><span id="local-6989586621680882946"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680882946"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-751"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; XRec (GhcPass p) Pat -&gt; Bool
forall (p :: Pass).
OutputableBndrId p =&gt;
Bool -&gt; LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isIrrefutableHsPat%27"><span class="hs-identifier hs-var">isIrrefutableHsPat'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Extension -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#xopt"><span class="hs-identifier hs-var">xopt</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#Strict"><span class="hs-identifier hs-var">LangExt.Strict</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680882946"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-752"></span><span>
</span><span id="line-753"></span><span class="hs-comment">{-
Note [-XStrict and irrefutability]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When -XStrict is enabled the rules for irrefutability are slightly modified.
Specifically, the pattern in a program like

    do ~(Just hi) &lt;- expr

cannot be considered irrefutable. The ~ here merely disables the bang that
-XStrict would usually apply, rendering the program equivalent to the following
without -XStrict

    do Just hi &lt;- expr

To achieve make this pattern irrefutable with -XStrict the user would rather
need to write

    do ~(~(Just hi)) &lt;- expr

Failing to account for this resulted in #19027. To fix this isIrrefutableHsPat
takes care to check for two the irrefutability of the inner pattern when it
encounters a LazyPat and -XStrict is enabled.

See also Note [decideBangHood] in GHC.HsToCore.Utils.
-}</span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span class="annot"><a href="GHC.Hs.Pat.html#isIrrefutableHsPat%27"><span class="hs-identifier hs-type">isIrrefutableHsPat'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680883738"><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#OutputableBndrId"><span class="hs-identifier hs-type">OutputableBndrId</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-780"></span><span>                    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ Are we in a @-XStrict@ context?</span><span>
</span><span id="line-781"></span><span>                            </span><span class="hs-comment">-- See Note [-XStrict and irrefutability]</span><span>
</span><span id="line-782"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-783"></span><span id="isIrrefutableHsPat%27"><span class="annot"><span class="annottext">isIrrefutableHsPat' :: forall (p :: Pass).
OutputableBndrId p =&gt;
Bool -&gt; LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isIrrefutableHsPat%27"><span class="hs-identifier hs-var hs-var">isIrrefutableHsPat'</span></a></span></span><span> </span><span id="local-6989586621680882933"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680882933"><span class="hs-identifier hs-var">is_strict</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span>
</span><span id="line-784"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-785"></span><span>    </span><span class="annot"><a href="#local-6989586621680882932"><span class="hs-identifier hs-type">goL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-786"></span><span>    </span><span id="local-6989586621680882932"><span class="annot"><span class="annottext">goL :: LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var hs-var">goL</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass p) -&gt; Bool)
-&gt; (GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p))
-&gt; GenLocated SrcSpan (Pat (GhcPass p))
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Pat (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span>
</span><span id="line-787"></span><span>
</span><span id="line-788"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-789"></span><span>    </span><span id="local-6989586621680882931"><span class="annot"><span class="annottext">go :: Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882931"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-type">WildPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-790"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-791"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882930"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882930"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-792"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680882933"><span class="hs-identifier hs-var">is_strict</span></a></span><span>
</span><span id="line-793"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; LPat (GhcPass p) -&gt; Bool
forall (p :: Pass).
OutputableBndrId p =&gt;
Bool -&gt; LPat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#isIrrefutableHsPat%27"><span class="hs-identifier hs-var">isIrrefutableHsPat'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882930"><span class="hs-identifier hs-var">p'</span></a></span><span>
</span><span id="line-794"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-795"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="annot"><span class="annottext">XBangPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882929"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882929"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882929"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-796"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882928"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882928"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882928"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-797"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span class="annot"><span class="annottext">XAsPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882927"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882927"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882927"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-798"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-type">ViewPat</span></a></span><span> </span><span class="annot"><span class="annottext">XViewPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882926"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882926"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882926"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-799"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSigPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882925"><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882925"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (NoGhcTc (GhcPass p))
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882925"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-800"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-type">TuplePat</span></a></span><span> </span><span class="annot"><span class="annottext">XTuplePat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882924"><span class="annot"><span class="annottext">[LPat (GhcPass p)]
</span><a href="#local-6989586621680882924"><span class="hs-identifier hs-var">pats</span></a></span></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Bool)
-&gt; [GenLocated SrcSpan (Pat (GhcPass p))] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass p)) -&gt; Bool
LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan (Pat (GhcPass p))]
[LPat (GhcPass p)]
</span><a href="#local-6989586621680882924"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-801"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-type">SumPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-802"></span><span>                    </span><span class="hs-comment">-- See Note [Unboxed sum patterns aren't irrefutable]</span><span>
</span><span id="line-803"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-type">ListPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-806"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con :: forall p. Pat p -&gt; Located (ConLikeP p)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882922"><span class="annot"><span class="annottext">Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680882922"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-807"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: forall p. Pat p -&gt; HsConPatDetails p
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882921"><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680882921"><span class="hs-identifier hs-var">details</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-808"></span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-809"></span><span>       </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-var">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-comment">-- Conservative</span><span>
</span><span id="line-810"></span><span>       </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-var">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-comment">-- Conservative</span><span>
</span><span id="line-811"></span><span>       </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Located (ConLikeP (GhcPass p))
</span><a href="#local-6989586621680882922"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-812"></span><span>         </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#PatSynCon"><span class="hs-identifier hs-type">PatSynCon</span></a></span><span> </span><span id="local-6989586621680882914"><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621680882914"><span class="hs-identifier hs-var">_pat</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-comment">-- Conservative</span><span>
</span><span id="line-813"></span><span>         </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621680882913"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680882913"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-814"></span><span>           </span><span class="annot"><span class="annottext">Maybe DataCon -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Maybe DataCon
</span><a href="GHC.Core.TyCon.html#tyConSingleDataCon_maybe"><span class="hs-identifier hs-var">tyConSingleDataCon_maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680882913"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-815"></span><span>           </span><span class="hs-comment">-- NB: tyConSingleDataCon_maybe, *not* isProductTyCon, because</span><span>
</span><span id="line-816"></span><span>           </span><span class="hs-comment">-- the latter is false of existentials. See #4439</span><span>
</span><span id="line-817"></span><span>           </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcTc) -&gt; Bool) -&gt; [Located (Pat GhcTc)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Bool
LPat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882932"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p) -&gt; [LPat (GhcPass p)]
forall p. HsConPatDetails p -&gt; [LPat p]
</span><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-var">hsConPatArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680882921"><span class="hs-identifier hs-var">details</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-818"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-type">LitPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-819"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-type">NPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-820"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-type">NPlusKPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span>    </span><span class="hs-comment">-- We conservatively assume that no TH splices are irrefutable</span><span>
</span><span id="line-823"></span><span>    </span><span class="hs-comment">-- since we cannot know until the splice is evaluated.</span><span>
</span><span id="line-824"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-type">SplicePat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-825"></span><span>
</span><span id="line-826"></span><span>    </span><span class="annot"><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-type">XPat</span></a></span><span> </span><span id="local-6989586621680882908"><span class="annot"><span class="annottext">XXPat (GhcPass p)
</span><a href="#local-6989586621680882908"><span class="hs-identifier hs-var">ext</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883738"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &lt; 811
</span><span>      </span><span class="hs-identifier">GhcPs</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">noExtCon</span><span> </span><span class="hs-identifier">ext</span><span>
</span><span id="line-829"></span><span>      </span><span class="hs-identifier">GhcRn</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">noExtCon</span><span> </span><span class="hs-identifier">ext</span><span class="hs-cpp">
#endif
</span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882931"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
Pat GhcTc
</span><a href="#local-6989586621680882906"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-832"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882906"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882906"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XXPat (GhcPass p)
CoPat
</span><a href="#local-6989586621680882908"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-833"></span><span>
</span><span id="line-834"></span><span class="hs-comment">-- | Is the pattern any of combination of:</span><span>
</span><span id="line-835"></span><span class="hs-comment">--</span><span>
</span><span id="line-836"></span><span class="hs-comment">-- - (pat)</span><span>
</span><span id="line-837"></span><span class="hs-comment">-- - pat :: Type</span><span>
</span><span id="line-838"></span><span class="hs-comment">-- - ~pat</span><span>
</span><span id="line-839"></span><span class="hs-comment">-- - !pat</span><span>
</span><span id="line-840"></span><span class="hs-comment">-- - x (variable)</span><span>
</span><span id="line-841"></span><span id="local-6989586621680883730"><span class="annot"><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-type">isSimplePat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883730"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883730"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-842"></span><span id="isSimplePat"><span class="annot"><span class="annottext">isSimplePat :: forall (x :: Pass). LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
</span><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-var hs-var">isSimplePat</span></a></span></span><span> </span><span id="local-6989586621680882905"><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882905"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass x)) -&gt; Pat (GhcPass x)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat (GhcPass x))
LPat (GhcPass x)
</span><a href="#local-6989586621680882905"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-843"></span><span>  </span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882904"><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882904"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
forall (x :: Pass). LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
</span><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-var">isSimplePat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882904"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-844"></span><span>  </span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSigPat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882903"><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882903"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (NoGhcTc (GhcPass x))
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
forall (x :: Pass). LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
</span><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-var">isSimplePat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882903"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-845"></span><span>  </span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882902"><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882902"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
forall (x :: Pass). LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
</span><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-var">isSimplePat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882902"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-846"></span><span>  </span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="annot"><span class="annottext">XBangPat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882901"><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882901"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
forall (x :: Pass). LPat (GhcPass x) -&gt; Maybe (IdP (GhcPass x))
</span><a href="GHC.Hs.Pat.html#isSimplePat"><span class="hs-identifier hs-var">isSimplePat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass x)
</span><a href="#local-6989586621680882901"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-847"></span><span>  </span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span class="annot"><span class="annottext">XVarPat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882900"><span class="annot"><span class="annottext">Located (IdP (GhcPass x))
</span><a href="#local-6989586621680882900"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IdGhcP x -&gt; Maybe (IdGhcP x)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdGhcP x) -&gt; IdGhcP x
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdGhcP x)
Located (IdP (GhcPass x))
</span><a href="#local-6989586621680882900"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-848"></span><span>  </span><span class="annot"><span class="annottext">Pat (GhcPass x)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (IdP (GhcPass x))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-849"></span><span>
</span><span id="line-850"></span><span>
</span><span id="line-851"></span><span class="hs-comment">{- Note [Unboxed sum patterns aren't irrefutable]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike unboxed tuples, unboxed sums are *not* irrefutable when used as
patterns. A simple example that demonstrates this is from #14228:

  pattern Just' x = (# x | #)
  pattern Nothing' = (# | () #)

  foo x = case x of
    Nothing' -&gt; putStrLn &quot;nothing&quot;
    Just'    -&gt; putStrLn &quot;just&quot;

In foo, the pattern Nothing' (that is, (# x | #)) is certainly not irrefutable,
as does not match an unboxed sum value of the same arity&#8212;namely, (# | y #)
(covered by Just'). In fact, no unboxed sum pattern is irrefutable, since the
minimum unboxed sum arity is 2.

Failing to mark unboxed sum patterns as non-irrefutable would cause the Just'
case in foo to be unreachable, as GHC would mistakenly believe that Nothing'
is the only thing that could possibly be matched!
-}</span><span>
</span><span id="line-872"></span><span>
</span><span id="line-873"></span><span class="hs-comment">-- | @'patNeedsParens' p pat@ returns 'True' if the pattern @pat@ needs</span><span>
</span><span id="line-874"></span><span class="hs-comment">-- parentheses under precedence @p@.</span><span>
</span><span id="line-875"></span><span class="annot"><a href="GHC.Hs.Pat.html#patNeedsParens"><span class="hs-identifier hs-type">patNeedsParens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680883820"><span class="annot"><a href="#local-6989586621680883820"><span class="hs-identifier hs-type">p</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#IsPass"><span class="hs-identifier hs-type">IsPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883820"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883820"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-876"></span><span id="patNeedsParens"><span class="annot"><span class="annottext">patNeedsParens :: forall (p :: Pass). IsPass p =&gt; PprPrec -&gt; Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#patNeedsParens"><span class="hs-identifier hs-var hs-var">patNeedsParens</span></a></span></span><span> </span><span id="local-6989586621680882894"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-877"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-878"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883820"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-879"></span><span>    </span><span id="local-6989586621680882893"><span class="annot"><span class="annottext">go :: Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882893"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-type">NPlusKPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#opPrec"><span class="hs-identifier hs-var">opPrec</span></a></span><span>
</span><span id="line-880"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-type">SplicePat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-881"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_args :: forall p. Pat p -&gt; HsConPatDetails p
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882890"><span class="annot"><span class="annottext">HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680882890"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-882"></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
-&gt; HsConDetails
     (Located (Pat (GhcPass p)))
     (HsRecFields (GhcPass p) (Located (Pat (GhcPass p))))
-&gt; Bool
forall a b. PprPrec -&gt; HsConDetails a b -&gt; Bool
</span><a href="GHC.Hs.Pat.html#conPatNeedsParens"><span class="hs-identifier hs-var">conPatNeedsParens</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">HsConDetails
  (Located (Pat (GhcPass p)))
  (HsRecFields (GhcPass p) (Located (Pat (GhcPass p))))
HsConPatDetails (GhcPass p)
</span><a href="#local-6989586621680882890"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-883"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#sigPrec"><span class="hs-identifier hs-var">sigPrec</span></a></span><span>
</span><span id="line-884"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-type">ViewPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-885"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-type">XPat</span></a></span><span> </span><span id="local-6989586621680882887"><span class="annot"><span class="annottext">XXPat (GhcPass p)
</span><a href="#local-6989586621680882887"><span class="hs-identifier hs-var">ext</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">forall (p :: Pass). IsPass p =&gt; GhcPass p
</span><a href="GHC.Hs.Extension.html#ghcPass"><span class="hs-identifier hs-var">ghcPass</span></a></span><span> </span><span class="hs-glyph">@</span><span class="annot"><a href="#local-6989586621680883820"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-886"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-var">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NoExtCon -&gt; Bool
forall a. NoExtCon -&gt; a
</span><a href="GHC.Hs.Extension.html#noExtCon"><span class="hs-identifier hs-var">noExtCon</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtCon
XXPat (GhcPass p)
</span><a href="#local-6989586621680882887"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-887"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-var">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NoExtCon -&gt; Bool
forall a. NoExtCon -&gt; a
</span><a href="GHC.Hs.Extension.html#noExtCon"><span class="hs-identifier hs-var">noExtCon</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtCon
XXPat (GhcPass p)
</span><a href="#local-6989586621680882887"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-888"></span><span>      </span><span class="annot"><span class="annottext">GhcPass p
</span><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-var">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p) -&gt; Bool
</span><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
Pat GhcTc
</span><a href="#local-6989586621680882882"><span class="hs-identifier hs-var">inner</span></a></span><span>
</span><span id="line-889"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882882"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882882"><span class="hs-identifier hs-var">inner</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XXPat (GhcPass p)
CoPat
</span><a href="#local-6989586621680882887"><span class="hs-identifier hs-var">ext</span></a></span><span>
</span><span id="line-890"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-type">WildPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-891"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-892"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-893"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-894"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-895"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-896"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-type">TuplePat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-897"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-type">SumPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-898"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-type">ListPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-899"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-type">LitPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLitPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882881"><span class="annot"><span class="annottext">HsLit (GhcPass p)
</span><a href="#local-6989586621680882881"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; HsLit (GhcPass p) -&gt; Bool
forall x. PprPrec -&gt; HsLit x -&gt; Bool
</span><a href="GHC.Hs.Lit.html#hsLitNeedsParens"><span class="hs-identifier hs-var">hsLitNeedsParens</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit (GhcPass p)
</span><a href="#local-6989586621680882881"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-900"></span><span>    </span><span class="annot"><a href="#local-6989586621680882893"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-type">NPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPat (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882879"><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680882879"><span class="hs-identifier hs-var">lol</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr (GhcPass p))
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass p)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; HsOverLit (GhcPass p) -&gt; Bool
forall x. PprPrec -&gt; HsOverLit x -&gt; Bool
</span><a href="GHC.Hs.Lit.html#hsOverLitNeedsParens"><span class="hs-identifier hs-var">hsOverLitNeedsParens</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882894"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p)) -&gt; HsOverLit (GhcPass p)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (HsOverLit (GhcPass p))
</span><a href="#local-6989586621680882879"><span class="hs-identifier hs-var">lol</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span class="hs-comment">-- | @'conPatNeedsParens' p cp@ returns 'True' if the constructor patterns @cp@</span><span>
</span><span id="line-903"></span><span class="hs-comment">-- needs parentheses under precedence @p@.</span><span>
</span><span id="line-904"></span><span id="local-6989586621680883725"><span id="local-6989586621680883726"><span class="annot"><a href="GHC.Hs.Pat.html#conPatNeedsParens"><span class="hs-identifier hs-type">conPatNeedsParens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsConDetails"><span class="hs-identifier hs-type">HsConDetails</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883726"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883725"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span></span><span>
</span><span id="line-905"></span><span id="conPatNeedsParens"><span class="annot"><span class="annottext">conPatNeedsParens :: forall a b. PprPrec -&gt; HsConDetails a b -&gt; Bool
</span><a href="GHC.Hs.Pat.html#conPatNeedsParens"><span class="hs-identifier hs-var hs-var">conPatNeedsParens</span></a></span></span><span> </span><span id="local-6989586621680882874"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882874"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsConDetails a b -&gt; Bool
</span><a href="#local-6989586621680882873"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-906"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-907"></span><span>    </span><span id="local-6989586621680882873"><span class="annot"><span class="annottext">go :: HsConDetails a b -&gt; Bool
</span><a href="#local-6989586621680882873"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-type">PrefixCon</span></a></span><span> </span><span id="local-6989586621680882872"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680882872"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882874"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#appPrec"><span class="hs-identifier hs-var">appPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680882872"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-908"></span><span>    </span><span class="annot"><a href="#local-6989586621680882873"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882874"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; PprPrec -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="GHC.Types.Basic.html#opPrec"><span class="hs-identifier hs-var">opPrec</span></a></span><span>
</span><span id="line-909"></span><span>    </span><span class="annot"><a href="#local-6989586621680882873"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-910"></span><span>
</span><span id="line-911"></span><span class="hs-comment">-- | @'parenthesizePat' p pat@ checks if @'patNeedsParens' p pat@ is true, and</span><span>
</span><span id="line-912"></span><span class="hs-comment">-- if so, surrounds @pat@ with a 'ParPat'. Otherwise, it simply returns @pat@.</span><span>
</span><span id="line-913"></span><span id="local-6989586621680883718"><span class="annot"><a href="GHC.Hs.Pat.html#parenthesizePat"><span class="hs-identifier hs-type">parenthesizePat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#IsPass"><span class="hs-identifier hs-type">IsPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883718"><span class="hs-identifier hs-type">p</span></a></span><span>
</span><span id="line-914"></span><span>                </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#PprPrec"><span class="hs-identifier hs-type">PprPrec</span></a></span><span>
</span><span id="line-915"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883718"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-916"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680883718"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-917"></span><span id="parenthesizePat"><span class="annot"><span class="annottext">parenthesizePat :: forall (p :: Pass).
IsPass p =&gt;
PprPrec -&gt; LPat (GhcPass p) -&gt; LPat (GhcPass p)
</span><a href="GHC.Hs.Pat.html#parenthesizePat"><span class="hs-identifier hs-var hs-var">parenthesizePat</span></a></span></span><span> </span><span id="local-6989586621680882867"><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882867"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680882866"><span class="annot"><span class="annottext">lpat :: LPat (GhcPass p)
</span><a href="#local-6989586621680882866"><span class="hs-identifier hs-var">lpat</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680882865"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680882865"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680882864"><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680882864"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-918"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprPrec -&gt; Pat (GhcPass p) -&gt; Bool
forall (p :: Pass). IsPass p =&gt; PprPrec -&gt; Pat (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#patNeedsParens"><span class="hs-identifier hs-var">patNeedsParens</span></a></span><span> </span><span class="annot"><span class="annottext">PprPrec
</span><a href="#local-6989586621680882867"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass p)
</span><a href="#local-6989586621680882864"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; Pat (GhcPass p) -&gt; GenLocated SrcSpan (Pat (GhcPass p))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680882865"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XParPat (GhcPass p) -&gt; LPat (GhcPass p) -&gt; Pat (GhcPass p)
forall p. XParPat p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-var">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XParPat (GhcPass p)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882866"><span class="hs-identifier hs-var">lpat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-919"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass p)
</span><a href="#local-6989586621680882866"><span class="hs-identifier hs-var">lpat</span></a></span><span>
</span><span id="line-920"></span><span>
</span><span id="line-921"></span><span class="hs-comment">{-
% Collect all EvVars from all constructor patterns
-}</span><span>
</span><span id="line-924"></span><span>
</span><span id="line-925"></span><span class="hs-comment">-- May need to add more cases</span><span>
</span><span id="line-926"></span><span class="annot"><a href="GHC.Hs.Pat.html#collectEvVarsPats"><span class="hs-identifier hs-type">collectEvVarsPats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#EvVar"><span class="hs-identifier hs-type">EvVar</span></a></span><span>
</span><span id="line-927"></span><span id="collectEvVarsPats"><span class="annot"><span class="annottext">collectEvVarsPats :: [Pat GhcTc] -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsPats"><span class="hs-identifier hs-var hs-var">collectEvVarsPats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Bag TyVar] -&gt; Bag TyVar
forall a. [Bag a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionManyBags"><span class="hs-identifier hs-var">unionManyBags</span></a></span><span> </span><span class="annot"><span class="annottext">([Bag TyVar] -&gt; Bag TyVar)
-&gt; ([Pat GhcTc] -&gt; [Bag TyVar]) -&gt; [Pat GhcTc] -&gt; Bag TyVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Bag TyVar) -&gt; [Pat GhcTc] -&gt; [Bag TyVar]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier hs-var">collectEvVarsPat</span></a></span><span>
</span><span id="line-928"></span><span>
</span><span id="line-929"></span><span class="annot"><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-type">collectEvVarsLPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#EvVar"><span class="hs-identifier hs-type">EvVar</span></a></span><span>
</span><span id="line-930"></span><span id="collectEvVarsLPat"><span class="annot"><span class="annottext">collectEvVarsLPat :: LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var hs-var">collectEvVarsLPat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier hs-var">collectEvVarsPat</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Bag TyVar)
-&gt; (Located (Pat GhcTc) -&gt; Pat GhcTc)
-&gt; Located (Pat GhcTc)
-&gt; Bag TyVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Pat GhcTc
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span>
</span><span id="line-931"></span><span>
</span><span id="line-932"></span><span class="annot"><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier hs-type">collectEvVarsPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#EvVar"><span class="hs-identifier hs-type">EvVar</span></a></span><span>
</span><span id="line-933"></span><span id="collectEvVarsPat"><span class="annot"><span class="annottext">collectEvVarsPat :: Pat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier hs-var hs-var">collectEvVarsPat</span></a></span></span><span> </span><span id="local-6989586621680882861"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882861"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-934"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882861"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-935"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882860"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882860"><span class="hs-identifier hs-var">p</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882860"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-936"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span class="annot"><span class="annottext">XAsPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Located (IdP GhcTc)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882859"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882859"><span class="hs-identifier hs-var">p</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882859"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-937"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span>  </span><span class="annot"><span class="annottext">XParPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882858"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882858"><span class="hs-identifier hs-var">p</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882858"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-938"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span class="annot"><span class="annottext">XBangPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882857"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882857"><span class="hs-identifier hs-var">p</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882857"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-939"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-type">ListPat</span></a></span><span> </span><span class="annot"><span class="annottext">XListPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882856"><span class="annot"><span class="annottext">[LPat GhcTc]
</span><a href="#local-6989586621680882856"><span class="hs-identifier hs-var">ps</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Bag TyVar] -&gt; Bag TyVar
forall a. [Bag a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionManyBags"><span class="hs-identifier hs-var">unionManyBags</span></a></span><span> </span><span class="annot"><span class="annottext">([Bag TyVar] -&gt; Bag TyVar) -&gt; [Bag TyVar] -&gt; Bag TyVar
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcTc) -&gt; Bag TyVar)
-&gt; [Located (Pat GhcTc)] -&gt; [Bag TyVar]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Bag TyVar
LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
[LPat GhcTc]
</span><a href="#local-6989586621680882856"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-940"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-type">TuplePat</span></a></span><span> </span><span class="annot"><span class="annottext">XTuplePat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882855"><span class="annot"><span class="annottext">[LPat GhcTc]
</span><a href="#local-6989586621680882855"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Bag TyVar] -&gt; Bag TyVar
forall a. [Bag a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionManyBags"><span class="hs-identifier hs-var">unionManyBags</span></a></span><span> </span><span class="annot"><span class="annottext">([Bag TyVar] -&gt; Bag TyVar) -&gt; [Bag TyVar] -&gt; Bag TyVar
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcTc) -&gt; Bag TyVar)
-&gt; [Located (Pat GhcTc)] -&gt; [Bag TyVar]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Bag TyVar
LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
[LPat GhcTc]
</span><a href="#local-6989586621680882855"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-941"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-type">SumPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSumPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882854"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882854"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882854"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-942"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-943"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_args :: forall p. Pat p -&gt; HsConPatDetails p
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882853"><span class="annot"><span class="annottext">HsConPatDetails GhcTc
</span><a href="#local-6989586621680882853"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-944"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: forall p. Pat p -&gt; XConPat p
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-type">ConPatTc</span></a></span><span>
</span><span id="line-945"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cpt_dicts :: ConPatTc -&gt; [TyVar]
</span><a href="GHC.Hs.Pat.html#cpt_dicts"><span class="hs-identifier hs-var">cpt_dicts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680882852"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680882852"><span class="hs-identifier hs-var">dicts</span></a></span></span><span>
</span><span id="line-946"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-947"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-948"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bag TyVar -&gt; Bag TyVar -&gt; Bag TyVar
forall a. Bag a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionBags"><span class="hs-identifier hs-var">unionBags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar] -&gt; Bag TyVar
forall a. [a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#listToBag"><span class="hs-identifier hs-var">listToBag</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680882852"><span class="hs-identifier hs-var">dicts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-949"></span><span>                                   </span><span class="annot"><span class="annottext">(Bag TyVar -&gt; Bag TyVar) -&gt; Bag TyVar -&gt; Bag TyVar
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Bag TyVar] -&gt; Bag TyVar
forall a. [Bag a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionManyBags"><span class="hs-identifier hs-var">unionManyBags</span></a></span><span>
</span><span id="line-950"></span><span>                                   </span><span class="annot"><span class="annottext">([Bag TyVar] -&gt; Bag TyVar) -&gt; [Bag TyVar] -&gt; Bag TyVar
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcTc) -&gt; Bag TyVar)
-&gt; [Located (Pat GhcTc)] -&gt; [Bag TyVar]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Bag TyVar
LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span>
</span><span id="line-951"></span><span>                                   </span><span class="annot"><span class="annottext">([Located (Pat GhcTc)] -&gt; [Bag TyVar])
-&gt; [Located (Pat GhcTc)] -&gt; [Bag TyVar]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails GhcTc -&gt; [LPat GhcTc]
forall p. HsConPatDetails p -&gt; [LPat p]
</span><a href="GHC.Hs.Pat.html#hsConPatArgs"><span class="hs-identifier hs-var">hsConPatArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails GhcTc
</span><a href="#local-6989586621680882853"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-952"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span>  </span><span class="annot"><span class="annottext">XSigPat GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882849"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882849"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (NoGhcTc GhcTc)
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsLPat"><span class="hs-identifier hs-var">collectEvVarsLPat</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621680882849"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-953"></span><span>    </span><span class="annot"><a href="GHC.Hs.Pat.html#XPat"><span class="hs-identifier hs-type">XPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#CoPat"><span class="hs-identifier hs-type">CoPat</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680882848"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882848"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Bag TyVar
</span><a href="GHC.Hs.Pat.html#collectEvVarsPat"><span class="hs-identifier hs-var">collectEvVarsPat</span></a></span><span>  </span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882848"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-954"></span><span>    </span><span id="local-6989586621680882847"><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621680882847"><span class="hs-identifier hs-var">_other_pat</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bag TyVar
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span>
</span><span id="line-955"></span></pre></body></html>